I have isolated the code and reproduced the situation. Code and the file is here:
http://talemon.com/share/bugtest.zipI've written "test" in two different lines in a text file and saved it in notepad++ as UCS-2 LE. I've read the file line by line with file_str_readtow. I then use diag_var to output the results of str_len calls on two strings I've read to. First call returns 6 whereas second one returns 4.
I've also looked the file with a hex-editor and it starts with a 0xFEFF which is the BOM.
If you could look at it and tell me why I'm getting different results I would really appreciate it.
Thanks.