Re: Decoding ANSI c string from win32
Re: Decoding ANSI c string from win32
- Subject: Re: Decoding ANSI c string from win32
- From: Aki Inoue <email@hidden>
- Date: Tue, 5 Nov 2002 11:01:08 -0800
Jon,
The short answer is that NSWindowsCP1252StringEncoding is what you're
looking for.
The encoding is an extension of ISO 8859-1 (aka latin1) with characters
like the Euro sign added.
CP1250 is an extension of ISO 8859-2 (aka latin2) that covers Central
European languages.
Mac OS X supports all 'ANSI' codepages defined by MS; from CP1250 to
CP1258.
See CFStringEncodingExt,h for more encodings.
Aki
On 2002.11.5, at 12:19 AM, JONATHANJOSEPH HESS wrote:
I'm reading data off a socket that was generated via windows c strings
(vanilla char *'s), I need to convert that data to NSString objects.
I've
been using NSString's stringWithCString: but that doesn't seem optimal.
msdn.microsoft.com says windows c strings are "ANSI"
What constant does this best correlate to ?
NSWindowsCP1250StringEncoding?
NSWindowsCP1252StringEncoding?
Or some other one?
What id the diff between those two btw?
Thanks -
Jon Hess
_______________________________________________
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.
_______________________________________________
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.