khronos_group
04-10-2012, 05:15 PM
Hi,
We have a forum that uses Chinese Simplified and Chinese Traditional. Almost all the text is fine, except for a few characters that appear as "?" in a black diamond.
The text is fine in the MySQL database, and it is fine, if I click to edit the post. Only in the forum listing does the text show up incorrectly. Here is a sample like of text not working:
http://cn.khronos.org/forums/threads/5-如果OpenGL-ES-应用于手机平台的输入法应用界面绘��-�,性能会否可以得到很高提升呢??langid=1
Our character sets are set to UTF-8, and in MySQL we have the following when look at the variables:
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
The page headers are also using UTF-8 correctly:
Content-Type: text/html; charset=UTF-8
Now here is the really strange part: If I add a single plain space a few characters before where the broken characters appear, and save the edit post, the broken characters are now fine, and the characters one position to the right are broken.
To me it appears that vBulletin is not displaying the characters correctly in the post view and thread view, as everywhere else the characters are fine.
--------------- Added 1334082132 at 1334082132 ---------------
Wow, I spent 3 days looking for a solution. I finally gave up and posted here, and 2 seconds later (well, maybe 2 minutes) I found this post with the solution:
https://www.vbulletin.com/forum/showthread.php/392780-My-site(traditional-chinese)-Blog-title-is-broken
Seems vBulletin will add spaces to the text, which is fine in single byte characters. In multibyte languages this wreaks havoc with the text. Changing the 'Number of Characters Before Wrapping Text' in the Thread Display Options to Zero, fixes the issue.
Hope this helps someone else.
We have a forum that uses Chinese Simplified and Chinese Traditional. Almost all the text is fine, except for a few characters that appear as "?" in a black diamond.
The text is fine in the MySQL database, and it is fine, if I click to edit the post. Only in the forum listing does the text show up incorrectly. Here is a sample like of text not working:
http://cn.khronos.org/forums/threads/5-如果OpenGL-ES-应用于手机平台的输入法应用界面绘��-�,性能会否可以得到很高提升呢??langid=1
Our character sets are set to UTF-8, and in MySQL we have the following when look at the variables:
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
The page headers are also using UTF-8 correctly:
Content-Type: text/html; charset=UTF-8
Now here is the really strange part: If I add a single plain space a few characters before where the broken characters appear, and save the edit post, the broken characters are now fine, and the characters one position to the right are broken.
To me it appears that vBulletin is not displaying the characters correctly in the post view and thread view, as everywhere else the characters are fine.
--------------- Added 1334082132 at 1334082132 ---------------
Wow, I spent 3 days looking for a solution. I finally gave up and posted here, and 2 seconds later (well, maybe 2 minutes) I found this post with the solution:
https://www.vbulletin.com/forum/showthread.php/392780-My-site(traditional-chinese)-Blog-title-is-broken
Seems vBulletin will add spaces to the text, which is fine in single byte characters. In multibyte languages this wreaks havoc with the text. Changing the 'Number of Characters Before Wrapping Text' in the Thread Display Options to Zero, fixes the issue.
Hope this helps someone else.