Re: 8-bit chars in @""
Re: 8-bit chars in @""
- Subject: Re: 8-bit chars in @""
- From: Matt Neuburg <email@hidden>
- Date: Sun, 24 Mar 2002 09:54:44 -0800
At 9:26 AM -0800 3/24/02, thus spake moi:
>
On Wed, 20 Mar 2002 18:05:36 +0100, Ondra Cada <email@hidden> said:
>
>
>On Wednesday, March 20, 2002, at 05:48 , Erik J. Barzeski wrote:
>
>
>
>> I read the documentation the other day and it notes that @"" is a useful
>
>> shortcut (we all knew that). It also says it takes only 7-bit characters.
>
>> NSStrings are of course Unicode (loosely put).
>
>...
>
>> They don't print properly when used in #warnings or in NSLogs. Yet they
>
>> work
>
>> just fine when the application is used. They're properly inserted into
>
>> text
>
>> fields, etc. Any idea?
>
>
>
>Use NSLocalizedString and companions to get any Unicode values -- you can
>
>easily do that even if they are in fact not localizable (with the
>
>appropriate strings table directly in Resources).
>
>
I don't get it. Can someone clarify by example? If I type @"*" (that
>
character is a bullet) directly into my code, it works. If I type
>
>
"bullet"="*"
>
>
into Localizable.strings, it doesn't work (I get the Yen character
>
instead).
Oh, I see, I have to set Localizable.strings to be UTF-8. Is that it? (I
still don't get why there isn't some easy way to represent Unicode inside a
literal NSString.) m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
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.