Re: 8-bit chars in @""
Re: 8-bit chars in @""
- Subject: Re: 8-bit chars in @""
- From: Matt Neuburg <email@hidden>
- Date: Mon, 25 Mar 2002 12:24:46 -0800
At 11:57 AM -0800 3/25/02, thus spake Douglas Davidson:
>
On Monday, March 25, 2002, at 11:32 AM, Matt Neuburg wrote:
>
>
> [NSString stringWithCharacters:(unichar*)"\x20\x22" length:1]
>
>
>
> That's my favorite as being easiest to read when you know the hex
>
> unicode
>
> values, and as being self-contained. The cast is just to stave off the
>
> compiler warning; it isn't really necessary.
>
>
Actually, the compiler is trying to tell you something here...there is
>
an endianness problem.
Thx - maybe I'm being dense but I don't understand yet. I guess I could write:
[NSString stringWithCharacters:"\xFE\xFF\x20\x22" length:2]
This ought to solve any endianity problem but I still get the compiler
warning if I don't cast. 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.