• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: cString vs UTF8String (memory question)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: cString vs UTF8String (memory question) (From: John Timmer <email@hidden>)

  • Prev by Date: NSImageView animation not working
  • Next by Date: Re: ZeroLink FAQ (was Re: XCode or code problems?)
  • Previous by thread: Re: cString vs UTF8String (memory question)
  • Next by thread: Re: cString vs UTF8String (memory question)
  • Index(es):
    • Date
    • Thread