Reply
Thread Tools Display Modes
Unread 03-06-13, 12:08 AM   #1
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,747
Issue with truncated text and Unicode

Odd little issue I noticed today. Whenever I post an addon update, I always post a comment with the latest changes. Today after posting patch updates, I posted a couple of translation updates with the following comments:

Version 5.2.0.50
  • Updated 繁體中文 translations from BNSSNB on Curse
Version 5.2.0.50
  • Updated 简体中文 and 正體中文 translations
(Yes, both addons happen to have the same version number.)

On my addon author list, at the bottom where it shows recent comments on my addons, those comments are being truncated, but the function doing the truncating is apparently not Unicode-aware, and the text is getting cut mid-Chinese glyph, resulting in the following displayed text:

Version 5.2.0.50 Updated ౙ...
Version 5.2.0.50 Updated ಠ...
As you can see, the final characters are displayed as Telugu and Kannada glyphs, respectively, not the Chinese glyphs that appear in the actual comments.

Granted, this is an English-language site and I don't expect you guys to go out of your way to support Chinese or anything. I just thought it was pretty funny to look at my recent comments and see half of a Face of Disapproval lurking there.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 03-06-13, 01:45 AM   #2
Dolby
Every day I'm shuffling
 
Dolby's Avatar
Premium Member
WoWInterface Admin
Join Date: Feb 2004
Posts: 1,993
Oh fun, thanks for pointing that out. I'll take a look where I'm truncating it. Might be a bit if a challenge if its the vbulletin backend doing the unicode stuff after.
Dolby is offline   Reply With Quote
Unread 03-06-13, 04:43 AM   #3
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,747
On a possibly related note, sometimes when I edit my addon descriptions, non-Latin characters are displayed normally in the edit box (eg. 中) but other times they're displayed as HTML entities (eg. & # 20013 ; without all the spaces).

Any idea why this is? Generally the only non-Latin text in there are localized language names, and occasionally a localized one-line description, but I'd rather see the actual characters than a big blob of HTML entities.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Reply

Go BackWoWInterface » Site Forums » Site help, bugs, suggestions/questions » Issue with truncated text and Unicode

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off