Skip navigation.
 
mlRe: non-ASCII characters in CFString literal [Was: (no subject)]
FROM : Nick Zitzmann
DATE : Tue Jul 11 19:58:38 2006

On Jul 11, 2006, at 10:40 AM, Antonio Nunes wrote:

> Have a look at stringWithUTF8String
>
> Example of use:
> NSString *myString = [NSString stringWithUTF8String:"%Äåòåë§ó ÐÄÆ\n"];


Which, by the way, only works if the source file is being saved as 
UTF-8 by the text editor. It'll most likely blow up if it's saved 
using any other encoding. I think Xcode defaults to saving source 
files using MacRoman. NSLocalizedString() or unichar arrays are 
really the way to go to put non-ASCII characters into NSStrings.

Nick Zitzmann
<http://www.chronosnet.com/>

Related mailsAuthorDate
mlRe: non-ASCII characters in CFString literal [Was: (no subject)] Antonio Nunes Jul 11, 18:40
mlRe: non-ASCII characters in CFString literal [Was: (no subject)] Nick Zitzmann Jul 11, 19:58
mlRe: non-ASCII characters in CFString literal [Was: (no subject)] D.K. Johnston Jul 12, 00:24
mlRe: non-ASCII characters in CFString literal [Was: (no subject)] Tony Cate Jul 12, 00:43
mlRe: non-ASCII characters in CFString literal [Was: (no subject)] j o a r Jul 12, 01:05