MadOwl

Phaser: Problems with non-English symbols in localization files

Recommended Posts

Hello!

I have a problem, friends:

I use Phaser text objects in my game: game.add.text(...

My way of implementing game localization is the simplest possible way: I just store strings like var locString_testString = 'test string' in a separate .js files.

When I use English, everything is fine. But when I change 'test string' to something like "ぽ", weird stuff (check the attachment) is displayed.

My files are in UTF-8.

I checked docs, but didn't find anything according to locale/localization.

Maybe some of you faced the same problem? I will appreciate any help!

 

123.JPG

Share this post


Link to post
Share on other sites

I agree with @mattstyles suggestion, but on a recent project I was involved with the localisation issue arose because Excel wouldn't export some characters correctly to CSV. I ended up creating the files in OpenOffice which seemed to edit the text file (CSV in this case) "raw".

 

 

Share this post


Link to post
Share on other sites

I am digging this...

Just noticed a strange behaviour: when I use \u1321 code symbols, sometimes it works: if my localization file contains 死, Phaser fails to display it. If I use something like \u1231, it displays a right letter. 

It seems it's an encoding problem. Hell.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.