tags:

views:

18

answers:

1
NSString *myString = [NSString stringWithFormat:@"%@",BernabÈu];
NSLog(@"%@", myString);

Above statement prints:

  Bernab\u00c8u

Here 'BernabÈu' is Spanish character string.

Why is the "\u00c8u" appended? How to get rid of it?

A: 

The because the '\u00c8' is the unicode representation of the E. I don't have the code handy, but you will have to look into using Locale's I think to get it to print with the correct character. But don't worry. Java still understands that this is an E.

(don't have the correct 'E' handy either :-)

Derek Clarkson
I need to encode this string in a formatted form so that it can be usable in 'urlwithstring' method.But inclusion of this string as it is in the method gives me unexpected results.Some or otHer way I've to get rid of this weird string.Any solution in ObjectiveC ?
surajbaba
Doh, had my Java hat on. I'm still coming up to speed with ObjectiveC and have not had to deal with this issue. But I'd assume it's pretty much the same thing. i'd grab the manual sections on internationalization and have a read through those. They should be able to to give you some pointers.
Derek Clarkson