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 waynechiang » Fri Dec 28, 2007 9:29 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 "老(鼠)"

Wayne Chiang
waynechiang
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Dec 28, 2007 8:35 am
Location: Taiwan, Taipei

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests