Re: cString vs UTF8String (memory question)
Re: cString vs UTF8String (memory question)
- Subject: Re: cString vs UTF8String (memory question)
- From: j o a r <email@hidden>
- Date: Fri, 12 Dec 2003 22:04:03 +0100
I would suggest creating strings from downloaded web pages using
WebKit. I think I have posted about how to do that on this list (or
perhaps on Mac OS X Dev). The good thing about doing that is that it
automatically detects the proper encoding for you (at least it will to
a much better job of detecting the encoding that you could ever do
yourself...).
j o a r
On 2003-12-12, at 21.45, John Timmer wrote:
>
Just a word of warning on doing this arbitrarily - in downloading some
>
web
>
page info, using UTF8String would mostly work, but occasionally return
>
nil,
>
leading to sporadic crashes in my app. I wound up having to use
>
initWithData: encoding: and use NSISOLatin1StringEncoding in order to
>
make
>
sure that something was consistently generated.
>
>
If it had failed every time, it would have been easy to diagnose, but
>
the
>
erratic nature caused me headaches, so I thought a warning was in
>
order...
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.