Re: Diacritical characters (Umlaute) in Obj-C Source
Re: Diacritical characters (Umlaute) in Obj-C Source
- Subject: Re: Diacritical characters (Umlaute) in Obj-C Source
- From: Stefan Pantke <email@hidden>
- Date: Sun, 25 Jan 2004 10:57:22 +0100
Funny thing, I compile something like
@"vd|",
XCode reports some hints on probably incorrectly coded
Umlaute in CFString.
If I prepare a C-String
"vd|"
nothing gets reported...
Thus, I expected non-ASCII characters to be right in C-strings -
at least using GCC in XCode.
Not I know better..... Thanks!
Am 25.01.2004 um 10:07 schrieb M. Uli Kusterer:
At 2:56 Uhr +0100 25.01.2004, Stefan Pantke wrote:
I need to find diacritical charactes (e.g. d (Umlaute)) and replace
them in some
fashion.
XCode reports a
non-ASCII string in CFString .
Thus, I suppose, non-ascii characters are not allowed.
No. The C and ObjC language standards are defined as taking the ASCII
character set. Anything else you may get in some compilers is pure
luck.
How may I inter these special characters? By ASCII Code? Or
as simple C string - not as Obj-C @-string?
What you can do is put your Umlauts into a .strings file (which is
required to be UTF-8, which covers all of Unicode, including Umlauts),
and then fetch them out of there using NSLocalizedString. That's what
I do, at least.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.