It seems that there is a problem in B4A reading UTF-8 text files.
In the attached code I try to read 4 files:
- test_b4a.txt written with B4A with Writer.WriteLine(i) i = 0, 1 , 2 etc.
- test_b4ppc.txt, the 'same' file written with B4PPC
- test_notepad.txt, the 'same' file written with the Notepad.
- test_b4a_1.txt written with B4A with Writer.WriteLine(txt) txt = "0", "1" etc, (reading back the lines from test_b4a.txt and writing back to test_b4a_1.txt not included in the test program).
Reading test_b4a.txt no problem
Reading test_b4ppc.txt, text_notepad.txt and test_b4a_1.txt raise the NumberFormatError error.
To get the correct value we need to remove the first byte of the first line.
All three files, test_b4ppc.txt, test_notepad.txt and test_b4a_1.txt have the first 3 bytes (hex EF BB BF) of the UTF-8 encoding.
File test_b4a.txt doesn't have those 3 bytes.
But the length of the first line, in the three files, is 2, so it seems that B4A removes the first two bytes but not the third one ?
Attached the test program with the files.
Best regards.