• 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: Text file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text file


  • Subject: Re: Text file
  • From: Henrietta Read <email@hidden>
  • Date: Mon, 19 Apr 2010 13:48:19 -0700

That's a good idea, thank you! :)




On Sun, Apr 18, 2010 at 12:41 PM, Jens Alfke <email@hidden> wrote:

>
> On Apr 18, 2010, at 12:40 AM, Henrietta Read wrote:
>
> > exactly the point germane, but in perusing NSString.h one is given to
> understand this method might not be as 'smart' as one could wish:
>
> I wouldn’t think it would fail with MacRoman, though. Did you check the
> output NSError? Also, try inspecting the file with a hex editor … maybe
> there are some invisible null bytes or control characters.
>
> What I usually do in cases like this, when trying to decode arbitrary data
> to strings, is to fall back to assuming NSWindowsCP1252StringEncoding. This
> is (a) a very common encoding [the default on most Windows systems], (b)
> fairly standard (it’s a superset of ISO-Latin-1), and (c) always works since
> it encodes all 256 bytes values.
>
> —Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Text file (From: Henrietta Read <email@hidden>)
 >Re: Text file (From: Jens Alfke <email@hidden>)
 >Re: Text file (From: Henrietta Read <email@hidden>)
 >Re: Text file (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Questions about 2D drawing in Cocoa
  • Next by Date: using coregraphics with vector art from illustrator
  • Previous by thread: Re: Text file
  • Next by thread: Re: Text file
  • Index(es):
    • Date
    • Thread