Re: File name encoding problem
Re: File name encoding problem
- Subject: Re: File name encoding problem
- From: James Bucanek <email@hidden>
- Date: Mon, 19 Sep 2005 07:35:14 -0700
Thomas Hartwich wrote on Monday, September 19, 2005:
>I have a problem figuring out how to match file names returned from
>NSFileManger with file names found in a UTF8 encoded XML file.
>NSFileManger returns something different from UTF8, but so far I have not
>been successful to match the encodings.
>I have set my editor in XCode to UTF8 encoding, so the display looks ok.
>
>Here is the dource code, with a few things I tried:
<clip>
> [NSString stringWithUTF8String:"Qualité presse.joboptions"],
<clip>
>I am probably overlooking something obvious. Please point me into the right
>direction.
I think your problem might be the gcc compiler. You can't put non-ASCII characters in C source files. For all kinds of arcane reasons, the compiler can't know the encoding of file when it is compiling. So gcc has always required that C source code, which includes Obj-C and C++, be restricted to 7-bit ASCII characters. I also know that gcc does not like some non-ASCII characters in NSString literals either.
You might try writing the strings using hexadecimal or Unicode escape sequences.
If this is your problem, then issue is one for the Xcode list (email@hidden). There has been numerous threads on the this subject in the past.
--
James Bucanek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden