Cant't use UTF-8 source files. False string interpretation.
Cant't use UTF-8 source files. False string interpretation.
- Subject: Cant't use UTF-8 source files. False string interpretation.
- From: Bernd Carl <email@hidden>
- Date: Mon, 16 Feb 2004 14:42:02 +0100
Hello,
my problem is that I cannot programmaticaly apply international
characters to my nib file.
It is possible to enter arabic letters in an NSTextField by using IB's
Attributes window but I can't [text1 setStringValue:@"someArabic"];
Whenever I try to do so XCode tells me that I need to change the
document layout to UTF-8. Then it does work in XCodes editor but not in
my GUI.
My window produces the usual crap when it's trying to display UTF-8 in
an non UTF-8 environment.
I'm confused. I know that my nib knows how to display arabic but only
when I use IB to enter it. There seems to be an communication problem at
build time.
The manual says this:
>Choosing File Encodings:
>You can choose the file encoding, which defines the character set that
Xcode uses to display and save a file. If you type a character that
isnt in the files encoding, Xcode asks whether you want to change the
encoding. Xcode uses the default single-byte string encoding, if
possible (usually Mac OS Roman), or Unicode if the file contains
double-byte characters.
>To change the file encoding for one or more files, select those files
in the Groups & Files list or in the detail view and open the inspector
window. In the General pane of the inspector window, choose the desired
file encoding from the File Encoding pop-up menu. Generally Unicode
(UTF-8) is best for source files and Unicode (UTF-16) is best for
.strings files.
>GCC, the compiler used by Xcode for C, C++, and Objective-C, expects
its source files to contain only ASCII characters, with the exception
that comments and strings can contain any characters. Make sure your
application and your source files both use the same encoding. [......]
Anyway, thanks for your help,
Bernd.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.