I'm having trouble getting my head around storing some translations in our product database (MySQL) and retrieving them.
Our admin page takes simplified Chinese text and stores it in a MySQL Database for later retrieval.
My form for storing the Chinese character translations into the MySQL table stores the Chinese character string like this...
ç¡®ä¿ä¹˜å®¢æ•°é‡ä¸ä¼šå¤šäºŽ14人+ å¯å‰å¾€å¤–å ¡ç¤ = 乘åKianaå·çš„全新体验
Kianaå·ä¸Šå°†ä¼šå¸¦ä½ 们游览74个壮观的圣çµç¾¤å²›ï¼Œæ›´å¯å‰å¾€å¤§å ¡ç¤å¤–围进行深潜。船上设有空调ã€å¤§åž‹ä¼šå®¢å®¤åŠèˆ’é€‚çš„èˆ¹èˆ±ç¡æˆ¿(åŒ…æ‹¬ä¸¤å¼ æ ‡å‡†å•人床的ç§äººæˆ¿)ã€‚èˆ¹ä¸Šçš„å®½é˜”ç”²æ¿æä¾›å¤§é‡ç©ºé—´ï¼Œè®©ä¹˜å®¢å¯ç©¿ä¸Šæµ®æ½œæˆ–深潜的潜水é…备。å†è€…,船上åªé™æœ€å¤šç››è½½14ä½ä¹˜å®¢ï¼Œæ‰€ä»¥ä½ 们å¯ä»¥å°½æƒ…在甲æ¿ä¸Šäº«å—日光浴和欣èµç¾Žä¸½çš„风景。
The getJSON throws an error when trying to retrieve this string (Although it does the English character set just fine). It sends a statusText message of "parsererror".
However, studying the error produced shows the text (responseText) was correctly retrieved as...
{"LanguageID":"91","Field":"briefdesc","Text":"确保乘客数量不会多于14人+ 可前往外堡礁 =
乘坐Kiana号的全新体验
Kiana号上将会带你们游览74个壮观的圣灵群岛,更可前往大堡礁外围进行深潜。船上设有空调、大型会客室及舒适的船舱睡房(包括两张标准单人床的私人房)。船上的宽阔甲板提供大量空间,让乘客可穿上浮潜或深潜的潜水配备。再者,船上只限最多盛载14位乘客,所以你们可以尽情在甲板上享受日光浴和欣赏美丽的风景。"}
Running the Json through JSONLint produces this error..
Parse error on line 4:
...fdesc", "Text": "确保乘客数量不会多于14人+ 可前往外
----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
Ultimately JQuery is failing to parse this JSON I believe and it seems to be related to the fact the characters are simplified Chinese. Can anyone give me any clues how to get past the JSON Parse error ?
Cheers