Re: cString vs UTF8String (memory question)
Re: cString vs UTF8String (memory question)
- Subject: Re: cString vs UTF8String (memory question)
- From: Andreas Mayer <email@hidden>
- Date: Fri, 12 Dec 2003 22:42:13 +0100
Am 12.12.2003 um 21:45 schrieb John Timmer:
in downloading some web
page info, using UTF8String would mostly work, but occasionally return
nil,
Well, if some data isn't in UTF8 you should not try to convert it to an
UTF8 string.
I wound up having to use
initWithData: encoding: and use NSISOLatin1StringEncoding in order to
make
sure that something was consistently generated.
While this will not break, you might simply get a wrong representation
if the source is not in Latin 1.
If alle bytes are below 128 most encodings (including UTF8) will give
the same results.
bye. Andreas.
_______________________________________________
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.