Some diacritic characters disappear on Android (Unity)

强颜欢笑 提交于 2020-01-06 07:43:09

问题


I've made a game in Unity which uses three languages (Dutch, Polish and English) and can both be played on PC and on Android. But on Android all Polish characters (ĄĆĘŃŚŹŻ) disappear except for these two characters: Ł & Ó. Does someone know what I could do to fix this? And before anyone asks I'm using a Unicode supported font.


回答1:


Well, if you hardcoded the characters in your app, then you need to do something like:

For Java (Note: Android is using Java)

  1. Write Ą as \u0104
  2. Write Ć as \u0106
  3. Write Ł as \u0141
  4. Write Ó as \u00d3

and so on.

For HTML / XML

  1. Write Ą as Ą
  2. Write Ć as Ć
  3. Write Ł as Ł
  4. Write Ó as Ó

and so on.

Search here for the equivalent unicode and hexadecimal values for the other Polish diacritic characters.

Also, when compiling source codes under Unity, you may need to provide the -codepage:utf8 switch when calling the MCS compiler. Otherwise, the compiler will default to whatever encoding the OS platform is using.



来源:https://stackoverflow.com/questions/21059128/some-diacritic-characters-disappear-on-android-unity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!