On Apr 21, 2008, at 8:35 AM, Ewan Delanoy wrote:
[theButton setTitle:[NSString stringWithFormat:@Put a n with a
tilde,like this : %c,0X00F1]];
Unfortunately, at runtime the exotic character is displayed
incorrectly:
it appears as
a breve (Unicode character number 02D8 instead of 00F1).
%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
Le 21 avr. 08 à 16:48, Jens Alfke a écrit :
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
(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 $(D+P(B in it
programmatically, as long as you're building with Xcode 3.0.)
What will be the output encoding in this case