X xalion Member Licensed User Longtime User Feb 20, 2011 #1 change the example.json as : {"menu": { "id": "file", "value": "File", "popup": { "menuitem": [ {"value": "文件", "onclick": "CreateNewDoc()"}, {"value": "打开", "onclick": "OpenDoc()"}, {"value": "关闭", "onclick": "CloseDoc()"} ] } }} and run the example. it displays chinses as �ļ�
change the example.json as : {"menu": { "id": "file", "value": "File", "popup": { "menuitem": [ {"value": "文件", "onclick": "CreateNewDoc()"}, {"value": "打开", "onclick": "OpenDoc()"}, {"value": "关闭", "onclick": "CloseDoc()"} ] } }} and run the example. it displays chinses as �ļ�
agraham Expert Licensed User Longtime User Feb 20, 2011 #2 Anytime you see a "box" character it is likely that you have an encoding problem. If you are reading from a file make sure that it is encoded as UTF-8.
Anytime you see a "box" character it is likely that you have an encoding problem. If you are reading from a file make sure that it is encoded as UTF-8.
X xalion Member Licensed User Longtime User Feb 23, 2011 #3 when the file encode UTF-8. samples shows runtime error!
Erel B4X founder Staff member Licensed User Longtime User Feb 23, 2011 #4 Can you upload a text file with the JSON text?
X xalion Member Licensed User Longtime User Feb 24, 2011 #5 ok. Attachments example.txt 251 bytes · Views: 318
Erel B4X founder Staff member Licensed User Longtime User Feb 24, 2011 #6 The same file encoded as UTF8 (without BOM) works fine and displays the Chinese characters. Attachments example.txt 257 bytes · Views: 321
jeffrey8227 Member Licensed User Longtime User Feb 24, 2011 #7 文件——另存为——编码,选择utf-8 只要手机用的,无论是ppc还是android系统的机器都要用utf-8编码!
X xalion Member Licensed User Longtime User Feb 24, 2011 #8 Thanks, It works fine now. I had test it with UTF with BOM. now It works with UTF without BOM.