Skip navigation.
 
mlConflicting encodings issue in a Cocoa app
FROM : Ewan Delanoy
DATE : Mon Apr 21 15:35:43 2008

Hello all,


in the user interface of my Cocoa app  I have a button with two
alternative titles,
one that I write in Interface Builder and the other appears on a line in
my code as
follows,


  [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).

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)

I thought at first that the problem came from my not localizing the Cocoa
project (I localize only at the very end), but even when I made the adhoc
localization the problem persisted.

                                                                Ewan

Related mailsAuthorDate
mlConflicting encodings issue in a Cocoa app Ewan Delanoy Apr 21, 15:35
mlRe: Conflicting encodings issue in a Cocoa app glenn andreas Apr 21, 15:38
mlRe: Conflicting encodings issue in a Cocoa app Jens Alfke Apr 21, 16:48
mlRe: Conflicting encodings issue in a Cocoa app Ewan Delanoy Apr 21, 16:58
mlRe: Conflicting encodings issue in a Cocoa app Ewan Delanoy Apr 21, 17:04
mlRe: Conflicting encodings issue in a Cocoa app Jean-Daniel Dupas Apr 21, 17:35
mlRe: Conflicting encodings issue in a Cocoa app Aki Inoue Apr 21, 18:54
mlRe: Conflicting encodings issue in a Cocoa app Jean-Daniel Dupas Apr 21, 19:05