0

I just had an error, at least different in Xcode. I tried to put support for another language in a few sentences of the app, when the user chooses to change the language the app accesses just another index of NSArray. What happens is that one of the languages ​​is Japanese, and ran a few sentences, others simply returned me the following:

 (
    "\U5f62\U5f0f",
    "\U9023\U63a5\U5230\U5176\U4ed6\U5730\U65b9",
    "\U884c\U674e\U8a8d\U9818",
    "\U9322"
)

The original NSArray was:

JapaneseTableTitles = [[NSArray alloc]initWithObjects:@"あなたが聞こえます",@"便利なフレーズ",@"語彙",@"対話",@"情報", nil];
darkman
  • 993
  • 3
  • 13
  • 31

1 Answers1

0

Are you NSLogging it? This is correct, as those are simply the Unicode code points of the Japanese/Chinese characters. If you do present those NSString in the UI (e.g. in a UILabel) they should appear correctly.

"\U5f62\U5f0f" = "形式"
"\U9023\U63a5\U5230\U5176\U4ed6\U5730\U65b9" = "連接到其他地方"
"\U884c\U674e\U8a8d\U9818" = "行李認領"
"\U9322" = "錢"
kennytm
  • 510,854
  • 105
  • 1,084
  • 1,005
  • Hi Kenny, when I NSLog HTTP requests response string and it appears as "ãÃÂïãÃâ¬ÃÂãÃÂÃâãÃÂ" and something different appears on LAbel but not the same as I expect in Japanese format. What should I check now? Thanks. – Paresh Masani Sep 07 '12 at 10:50
  • Did it Kenny - http://stackoverflow.com/questions/12316813/ios-handling-unicode-characters-from-http-request Thanks. – Paresh Masani Sep 07 '12 at 11:03