i have a text file with chinese characters and english characters that i need to insert into a row of a table.
I need to get the whole text file so i can do some text manipulation later.
However when i try and open the file using VB
I dont get the chinese Characters they are some other character set.
if i use notepad to view the File all looks well my local has chinese available to it.
Any tips would be appreciated please or is this just not possible using this method.
If anyone knows of another method please let me know.
Grant
I need to get the whole text file so i can do some text manipulation later.
However when i try and open the file using VB
Code:
Dim FSO As New FileSystemObject
Dim colFiles As Files
Dim objFolder As folder
Dim objFile As TextStream
Dim strPath As String
Dim strHTML As String
strPath = "C:\somepath\"
mstrFolderName = strPath
Set objFolder = FSO.GetFolder(strPath)
Set colFiles = objFolder.Files
For Each File In colFiles
Set objFile = FSO.OpenTextFile(File, ForReading, False, TristateMixed)
Dim objcon As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strSql As String
Set objcon = CurrentProject.Connection
strSql = "__TABLENAME"
rs.Open strSql, objcon, adOpenDynamic, adLockOptimistic
strHTML = objFile.ReadLine
rs.AddNew
rs!HTMLtext = strHTML
rs.Update
rs.Close
Next
I dont get the chinese Characters they are some other character set.
if i use notepad to view the File all looks well my local has chinese available to it.
Any tips would be appreciated please or is this just not possible using this method.
If anyone knows of another method please let me know.
Grant