Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#1948 closed defect (invalid)

Get SpiderMonkey to show non-ASCII characters correctly

Reported by: Adrián Chaves Owned by:
Priority: Should Have Milestone:
Component: Core engine Keywords: internationalization, spidermonkey
Cc: Yves Patch:

Description

Currently, as far as I can tell, we are sending SpiderMonkey UTF-8 strings, while SpiderMonkey actually expects UTF-16 strings.

I have not been able to solve the issue, but I think the source is the definition of IGUIObject::RegisterScriptHandler() in source/gui/IGUIObject.cpp.

To reproduce the issue, in binaries/data/mods/public/gui/pregame/mainmenu.xml, replace “Build: ” by something with non-ASCII characters, such as “Construción: ”. This is the result:

http://img153.imageshack.us/img153/6259/spidermonkeywrongencodi.png

Change History (5)

comment:1 by Yves, 11 years ago

I'm currently working on the Spidermonkey upgrade (#1886) and I could have a look at this if you don't need it for the localization immediately. If the same solution can be applied for the current and the new Spidermonkey I could commit it before the Spidermonkey upgrade (maybe weeks), otherwise I'd need to wait until the whole Spidermonkey upgrade is ready to commit (probably months).

comment:2 by Yves, 11 years ago

Keywords: spidermonkey added

comment:3 by Yves, 11 years ago

Cc: Yves added

comment:4 by Adrián Chaves, 11 years ago

Resolution: invalid
Status: newclosed

With the help of Philip I managed to get the strings displayed right by converting them from utf8 to utf16 before sending them to the game from C++. So there is actually no bug, just me not doing it right.

comment:5 by leper, 11 years ago

Milestone: Backlog
Note: See TracTickets for help on using tickets.