Re: Nonbreaking spaces in alerts
Re: Nonbreaking spaces in alerts
- Subject: Re: Nonbreaking spaces in alerts
- From: John Stiles <email@hidden>
- Date: Tue, 18 Oct 2005 14:22:50 -0700
On Oct 18, 2005, at 2:23 PM, Elias Mårtenson wrote:
Um, I don't think that will work. @"" strings only work with ASCII
because there is no encoding specified. They might coincidentally
work with MacRoman at present, but this is not guaranteed
behavior, and the docs specifically warn against relying on this.
The \u notation is specified in C99, and it's certainly accepted by
Apple's gcc when using the -std=c99 option. However, I was
surprised to see that while the compiler accepted the code, the
result wasn't what I had expected.
My guess is that gcc erroneously does in fact let the string pass
through some locale encoding, even though it shouldn't. The \u
notation is supposed to allow you to enter Unicode values in the
code without having to worry about the encoding of the local system
that runs the compile.
GCC isn't mangling the string. @"" is designed to take ASCII
encoding, not UTF8 or MacRoman or anything else. What you'll get for
any character above 127 is just undefined. Why Apple/NeXT chose to
make @"" work this way, I don't know, but that's the situation. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden