S sigster Active Member Licensed User Longtime User Feb 11, 2012 #1 Hi I am try to find out how to import XML into database did search the forum but did not see a sample I have csv file I download and it work well with DBUtils.InsertMaps but then I have character problem the file I import I need to download the file so I can not fix the file before I download Regards Sigster
Hi I am try to find out how to import XML into database did search the forum but did not see a sample I have csv file I download and it work well with DBUtils.InsertMaps but then I have character problem the file I import I need to download the file so I can not fix the file before I download Regards Sigster
Yafuhenk Active Member Licensed User Longtime User Feb 11, 2012 #2 Is it possible to upload the csv file so that some of us can have a look to see if the character problem you talk about can be solved? Upvote 0
Is it possible to upload the csv file so that some of us can have a look to see if the character problem you talk about can be solved?
S sigster Active Member Licensed User Longtime User Feb 11, 2012 #3 Thanks YAFUHENK This is the file Regards Sigster Attachments Bpost.txt Bpost.txt 88 bytes · Views: 319 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 12, 2012 #4 Your file is encoded with Windows-1252 character set. You can properly read the string with: Code: Dim tr As TextReader tr.Initialize2(File.OpenInput(File.DirAssets, "bpost.txt"), "Windows-1252") Log(tr.ReadAll) tr.Close StringUtils.LoadCSV only works with UTF8 files. If you want to use it you will need to first write the string to a temporary file with File.WriteString. Upvote 0
Your file is encoded with Windows-1252 character set. You can properly read the string with: Code: Dim tr As TextReader tr.Initialize2(File.OpenInput(File.DirAssets, "bpost.txt"), "Windows-1252") Log(tr.ReadAll) tr.Close StringUtils.LoadCSV only works with UTF8 files. If you want to use it you will need to first write the string to a temporary file with File.WriteString.
S sigster Active Member Licensed User Longtime User Feb 15, 2012 #5 Thanks this works well Code: Dim tr As TextReader tr.Initialize2(File.OpenInput(File.DirAssets, "bpost.txt"), "Windows-1252") Log(tr.ReadAll) tr.Close Regards Sigster Upvote 0
Thanks this works well Code: Dim tr As TextReader tr.Initialize2(File.OpenInput(File.DirAssets, "bpost.txt"), "Windows-1252") Log(tr.ReadAll) tr.Close Regards Sigster