Re: Unicode characters
Re: Unicode characters
- Subject: Re: Unicode characters
- From: Mactov <email@hidden>
- Date: Tue, 18 Mar 2003 23:20:19 +0100
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
Why doesn't it work ?
Mactov
The @"..." notation only permits 7-bit ASCII characters inside the
string.
You need to think of another way of embedding Unicode text into your
program
- there are a couple!
I was given the (one possible ?) answer by Clark S. Cox III and I now
use s = [NSString stringWithUTF8String: "<put your string here>"];
and it works as I wanted
--
mAKTOW
email@hidden
http://www.projectomega.org/fr/
_______________________________________________
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.