Resource is not loaded correctly for some Chinese character

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

Resource is not loaded correctly for some Chinese character

Postby EricJason » Thu Dec 09, 2010 11:45 am

Some Traditional Chinese characters are unable to get loaded directly using:
Code: Select all
  Resources.getStringArray( R.array.CHINESE_CHAR );


The ones I've found that does NOT get loaded are:
鼠 <--- this char is used in the below example










So if one defines (in strings.xml):
<array name="CHINESE_CHAR">
<item>老鼠</item>
</array>

then after executing the code:
String[] stringArray = Resources.getStringArray( R.array.CHINESE_CHAR );

stringArray[0] will then have the value of "老" (the word "鼠" will not get loaded)

But if one uses other symbols next to the character, they will get loaded correctly. (I use parenthesis)
<array name="CHINESE_CHAR">
<item>老(鼠)</item>
</array>

stringArray[0] will have the value of "老(鼠)"
__________________________________________________
ugg boots
uggs
EricJason
Junior Developer
Junior Developer
 
Posts: 23
Joined: Mon Apr 05, 2010 7:46 am

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 3 guests