It looks like Android is interpreting the Chinese character as a conversion specifier (like "s" is for String, "d" is for decimal, etc.).
Try adding a space after the "s" in "%1$s". Also make sure the "s" is a good and proper ASCII character. Also the double-quotes that you've placed around the string value are not necessary, is that a typo? -- Kostya 02.01.2011 12:55, Suresh Pal пишет: > Hi All, > > I am stuck with some resource localization problem. > I have a string in my default locale as follows: > <string name="msg_success_fail"> %1$s successful, %2$s failed.</ > string> > > and similarly I have a resource with same name for chinese language as > follows,: > > <string name="msg_success_fail" msgid="5553338716725484736">"%1$s成功, > %2$s失败。"</string> > > My problem is that for the chinese string its giving following > exeception at run time: > 12-31 03:11:50.423 3326 3334 E AndroidRuntime: FATAL EXCEPTION: > Notification Update Thread > 12-31 03:11:50.423 3326 3334 E AndroidRuntime: > java.util.UnknownFormatConversionException: Conversion is '成' > 12-31 03:11:50.423 3326 3334 E AndroidRuntime: at > java.util.Formatter$Transformer.transform(Formatter.java:1438) > 12-31 03:11:50.423 3326 3334 E AndroidRuntime: at > java.util.Formatter.doFormat(Formatter.java:1082) > 12-31 03:11:50.423 3326 3334 E AndroidRuntime: at > java.util.Formatter.format(Formatter.java:994) > 12-31 03:11:50.423 3326 3334 E AndroidRuntime: at > java.lang.String.format(String.java:2254) > 12-31 03:11:50.423 3326 3334 E AndroidRuntime: at > android.content.res.Resources.getString(Resources.java:283) > 12-31 03:11:50.423 3326 3334 E AndroidRuntime: at > android.content.Context.getString(Context.java:195) > 12-31 03:11:50.423 3326 3334 E AndroidRuntime: at > > I am not able to understand what is the reason for it. Is the resource > string for chinese language not proper or there is something else > which i need to take care of? > > Please help me in this regard. > -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en