Alhumdilah (Praise be to God) I have finally found the solution. The problem was the unicode format, the trouble lies with UTF-8 and UTF-16-BE formats. Once I save the file as UTF-16-LE (in Notepad Save As... Unicode) everything worked. Thanks for everybody's help.
Here is the code for anybody who needs this in the future:
Code:Private Function LoadLanguageFileUnicode(strPath As String) As Boolean Dim lngFileNum As Long Dim strResult() As String Dim bytResults() As Byte Dim iCounter As Long On Error GoTo ErrorHandler lngFileNum = FreeFile() Open strPath For Binary Access Read As #lngFileNum ReDim bytResults(LOF(lngFileNum) - 1) Get #lngFileNum, , bytResults Close #lngFileNum If bytResults(0) = 255 And bytResults(1) = 254 Then 'UTF16LE strResult = Split(Mid$(bytResults, 2), vbCrLf) ElseIf bytResults(0) = 254 And bytResults(1) = 255 Then 'UTF16BE Unicode format not supported LoadLanguageFileUnicode = False Exit Function ElseIf bytResults(0) = 239 And bytResults(1) = 187 And bytResults(2) = 191 Then 'UTF8 Unicode format not supported LoadLanguageFileUnicode = False Exit Function End If For iCounter = 0 To UBound(strResult) Label(iCounter).Caption = strResult(iCounter) Next iCounter LoadLanguageFileUnicode = True Exit Function ErrorHandler: LoadLanguageFileUnicode = False End Function




Reply With Quote