Re: Unicode - Converting memory to match NSCell -stringvalue?
Re: Unicode - Converting memory to match NSCell -stringvalue?
- Subject: Re: Unicode - Converting memory to match NSCell -stringvalue?
- From: ruffnex <email@hidden>
- Date: Sun, 1 Jun 2003 12:09:48 +0800
Hi Chris,
Just to follow up. If you don't want to use the localization
architecture, you can still use string constants with encoded strings,
just don't use the @"" construct:
"One solution is to use [NSString stringWithUTF8String:"xxx"] instead
of @"". This requires that you also change the encoding of the code
file to UTF-8 in Project Builder so that the "xxx" part is encoded
correctly."
Source:
http://www.stepwise.com/Articles/Technical/2003-04-03.01.html
--Simon
In this case, the docs are the C language specification: C source code
files are 7-bit ASCII text only. The compiler is free to do whatever
it wants with anything outside that range. On Mac OS X, right now
this means such strings are interpreted at run-time as being in the
whatever the current system encoding is.
The localization architecture is the right thing to use if you need
anything outside 7-bit ASCII. Plus, it's trivially simple to use.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.