Experimenting with reading large files and writing data to SQLite.
With this I noticed there are differences with the above 3 methods to get a byte array.
For example testing with this string (either in a file or as a string):
Phone¬Email¬Website¬Fax
13043¬FA512¬Pharmacy¬Community Pharmacy¬Visible¬
Reading this as string I get bytes -62 and -84 for the ¬ character and and only byte 10 for the linebreak
Reading this string from a text file (.csv) I get only byte -84 for the ¬ character and bytes 13 and 10 for the linebreak.
These are the code fragments to get the byte array:
I can work around this, but would like to understand why this happens and how I can predict what will happen.
RBS
With this I noticed there are differences with the above 3 methods to get a byte array.
For example testing with this string (either in a file or as a string):
Phone¬Email¬Website¬Fax
13043¬FA512¬Pharmacy¬Community Pharmacy¬Visible¬
Reading this as string I get bytes -62 and -84 for the ¬ character and and only byte 10 for the linebreak
Reading this string from a text file (.csv) I get only byte -84 for the ¬ character and bytes 13 and 10 for the linebreak.
These are the code fragments to get the byte array:
B4X:
'reading string:
arrBytes = strString.GetBytes("UTF8")
'reading file, using File:
arrBytes = File.ReadBytes(tFF.strFolder, tFF.strFile)
'reading the file using RAF:
RAF.Initialize(tFF.strFolder, tFF.strFile, True)
lBytes = RAF.Size
Dim arrBytes(lBytes) As Byte
RAF.ReadBytes(arrBytes, 0, lBytes, 0)
I can work around this, but would like to understand why this happens and how I can predict what will happen.
RBS