Re: Conflicting encodings issue in a Cocoa app
Re: Conflicting encodings issue in a Cocoa app
- Subject: Re: Conflicting encodings issue in a Cocoa app
- From: Jens Alfke <email@hidden>
- Date: Mon, 21 Apr 2008 07:48:35 -0700
On 21 Apr '08, at 6:35 AM, Ewan Delanoy wrote:
It seems clear that this is a conflicting encoding issue, but between
which encodings?
coming from where? (The default file encoding is "Unicode UTF-8" in
the
Xcode preferences, and it seems there is no item to deal with
encodings in
the Interface Builder's preferences)
"%c" is interpreted at runtime according to the default string
encoding for that process. This depends on what the user's preferred
language is set to, but for English and most European languages it's
MacRoman. That choice makes sense for backward-compatibility reasons,
but nowadays it tends to be mostly an annoyance.
So it's definitely best to stick to Unicode-based mechanisms, like "%C".
(By the way, in 10.5, GCC now allows you to use non-ascii characters
in string literals right in your source code. So there's no need to
construct a string with an ñ in it programmatically, as long as you're
building with Xcode 3.0.)
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden