Olaan Expert Licensed User Longtime User Aug 6, 2012 #1 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 Best Regards Theera :sign0085: Last edited: Oct 16, 2012
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 Best Regards Theera :sign0085:
klaus Expert Licensed User Longtime User Aug 6, 2012 #2 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. Best regards. Attachments db1.txt db1.txt 81 bytes · Views: 388 Upvote 0
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. Best regards.
Olaan Expert Licensed User Longtime User Aug 7, 2012 #3 Everytime I must encode with UTF-8 without BOM klaus said: 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. Best regards. Click to expand... 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. Best Regards Theera Upvote 0
Everytime I must encode with UTF-8 without BOM klaus said: 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. Best regards. Click to expand... 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. Best Regards Theera
klaus Expert Licensed User Longtime User Aug 7, 2012 #4 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. Best regards. Upvote 0
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. Best regards.
Rusty Well-Known Member Licensed User Longtime User Oct 31, 2013 #5 How are you reading the UTF8 file? Thanks, Rusty Upvote 0