views:

28

answers:

1

i have following string coming in the json response. "Gas-Heizung-Sanit\u00e4r" so how to display it. i want to display that \u00e4 as a german character..

NSString *str = "Gas-Heizung-Sanit\u00e4r";
NSLog(@"%c",str);

it only prints the german character.

+1  A: 

Hi Jaimin, the following works

  NSString *str = @"Gas-Heizung-Sanit\u00e4r";
  NSLog(@"%@",str);

You forgot the @ on the string and also the %c is for a character, you should use the %@ for a string

Liam