Skip navigation.
 
mlRe: Conflicting encodings issue in a Cocoa app
FROM : Aki Inoue
DATE : Mon Apr 21 18:54:25 2008

>> (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 ? GCC generate utf-8 
> or it uses the source file encoding ?


Regardless of GCC binary C string encoding settings, the content of 
constant CF/NSStrings are stored in UTF-16 in this case.

So, as long as your file encoding matches the GCC's file encoding 
setting (see -finput-charset) which is default to UTF-8, it just works.

Aki

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