Re: Unicode Characters
Re: Unicode Characters
- Subject: Re: Unicode Characters
- From: "Clark S. Cox III" <email@hidden>
- Date: Tue, 18 Mar 2003 15:12:56 -0500
On Tuesday, Mar 18, 2003, at 14:23 US/Eastern, Mactov wrote:
Hi,
Here are a few lines of Obj-C that are, alas, not working.
{
NSString *s;
s=@"@"; //for those who won't read Unicode characters, this is
supposed to be the russian letter "you"
[texteRU setString:s];
}
Where am I mistaking ? I changed my PB prefs to Unicode UTF-8 encoding
and I get the Unicode letters from my keyboard by switching it to
"Unicode Entry" (from the International SysPrefs). I regularly do this
without any problem with TextEdit or Mail and I get the appropriate
character in PB's text editor. But when I launch the app, the rusian
character turns into a "-e" or any 8bit-ASCII string
If, as you say, your source code files are encoded as UTF-8, then try
this:
NSString *s;
s = [NSString stringWithUTF8String: "<put your string here>"];
[texteRU setString: s];
Why doesn't it work ?
Because the @"" noitation only works with 7-bit ASCII characters
--
http://homepage.mac.com/clarkcox3/
email@hidden
Clark S. Cox, III
_______________________________________________
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.