#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:
Change History (5)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Keywords: | spidermonkey added |
---|
comment:3 by , 11 years ago
Cc: | added |
---|
comment:4 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
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 , 11 years ago
Milestone: | Backlog |
---|
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).