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">

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">

stringArray[0] will have the value of "老(鼠)"

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


Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: Google Feedfetcher, Yahoo [Bot] and 11 guests