I'm trying to set the encoding of a string correctly..
I have a:
NSString *jsonData = [[NSString alloc] initWithContentsOfURL:jsonURL];
The problem is, that when it retreives a character like ä, it'll stick it into the string as √§ (according to the debugger when I NSLog the string)
I've tried doing a:
NSString *jsonData = [[NSString alloc] initWithContentsOfURL:jsonURL encoding:NSUTF8StringEncoding];
But all that gives me is a warning when compiling (warning: no -InitwithContentsOfURL:encoding: method found) and gdb complains with: *** -[NSPlaceholderString initWithContentsOfURL:encoding:]: unrecognized selector sent to instance 0x513f50
Any suggestions on how to correctly populate this NSString with correct encoding ?
I have a:
NSString *jsonData = [[NSString alloc] initWithContentsOfURL:jsonURL];
The problem is, that when it retreives a character like ä, it'll stick it into the string as √§ (according to the debugger when I NSLog the string)
I've tried doing a:
NSString *jsonData = [[NSString alloc] initWithContentsOfURL:jsonURL encoding:NSUTF8StringEncoding];
But all that gives me is a warning when compiling (warning: no -InitwithContentsOfURL:encoding: method found) and gdb complains with: *** -[NSPlaceholderString initWithContentsOfURL:encoding:]: unrecognized selector sent to instance 0x513f50
Any suggestions on how to correctly populate this NSString with correct encoding ?