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
Your file is encoded with Windows-1252 character set.
You can properly read the string with:
B4X:
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.