Hi everyone
Reading an Hebrew text file cause gibberish when saving to table. I attached screen shot and the vba code ==>
Public Function KraPirsomotMeKovetzMekomi()
Dim objFSO As Object
Dim objTextStream As Object
Dim strTextLine As String
Dim strInputFileName As String
'On Error GoTo FileNotFound
strInputFileName = CurrentProject.Path & "\" & "maasrotads.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
'objFSO.Charset = "utf-8"
Set objTextStream = objFSO.OpenTextFile(strInputFileName)
Do While Not (objTextStream.AtEndOfStream)
strTextLine = objTextStream.ReadLine
Teur = strTextLine
strTextLine = objTextStream.ReadLine
Ktovet = strTextLine
strTextLine = objTextStream.ReadLine
Tmuna = strTextLine
HachnesPirsomotLaTavla
Loop
objTextStream.Close
ClearObjects:
Set objFSO = Nothing
Set objTextStream = Nothing
On Error GoTo 0
Exit Function
FileNotFound:
HachnesPirsomotKvuimLaTavla
Resume ClearObjects
End Function
Reading an Hebrew text file cause gibberish when saving to table. I attached screen shot and the vba code ==>
Public Function KraPirsomotMeKovetzMekomi()
Dim objFSO As Object
Dim objTextStream As Object
Dim strTextLine As String
Dim strInputFileName As String
'On Error GoTo FileNotFound
strInputFileName = CurrentProject.Path & "\" & "maasrotads.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
'objFSO.Charset = "utf-8"
Set objTextStream = objFSO.OpenTextFile(strInputFileName)
Do While Not (objTextStream.AtEndOfStream)
strTextLine = objTextStream.ReadLine
Teur = strTextLine
strTextLine = objTextStream.ReadLine
Ktovet = strTextLine
strTextLine = objTextStream.ReadLine
Tmuna = strTextLine
HachnesPirsomotLaTavla
Loop
objTextStream.Close
ClearObjects:
Set objFSO = Nothing
Set objTextStream = Nothing
On Error GoTo 0
Exit Function
FileNotFound:
HachnesPirsomotKvuimLaTavla
Resume ClearObjects
End Function