Hi Klaus and all,
Please correct my programming,I wonder that have something be wrong.
I think my answer was istr=Rice,Melon,Durain,Rose ,but it is istr=Melon,Durain,Rose
The problem is not the code but your db.txt file.
You must save it with UTF-8 without BOM encoding.
In your file the is the BOM at the beginning that disturbs your code.
The attached db1.txt file is your db.txt file saved with notepad++ with UTF-8 without BOM encoding.
The problem is not the code but your db.txt file.
You must save it with UTF-8 without BOM encoding.
In your file the is the BOM at the beginning that disturbs your code.
The attached db1.txt file is your db.txt file saved with notepad++ with UTF-8 without BOM encoding.
Hi Klaus,
Thank you very much. I need ask you about encoding. I ought to save as text file with UTF-8 without BOM encoding everytime or UTF-8 ? I always use Thai language. I 've never known about saving with UTF-8 without BOM encoding is difference from saving with UTF-8 encoding.
In Windows when you save with UTF-8 encoding there is a bytes header added called Byte Order Mask (0xEF,0xBB,0xBF or ).
In Android these three bytes are considered as one character and disturbed your code. Android doesn't use the BOM.
With the text editor notepad++ you have the choice to save with different encodings.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.