• 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: Really big files and encodings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Really big files and encodings


  • Subject: Re: Really big files and encodings
  • From: Michael Ash <email@hidden>
  • Date: Wed, 22 Apr 2009 11:09:26 -0400

On Wed, Apr 22, 2009 at 1:57 AM, Seth Willits <email@hidden> wrote:
> So, I generally know what I should do, but the problem is that I don't know
> how to identify an encoding as fixed-width or variable. I could spend the
> time to look up each and every encoding on the internet, but there are kind
> of a lot of them :) And then my code wouldn't be future-proof if an encoding
> is added.
>
>
> Can anyone offer some insight into how I could dynamically determine an
> encoding's characteristics? Or maybe I should just hard code it/do it by
> hand because there are really very few cases to handle.

Do your files have regularly occurring newlines like most normal text
files? If so, then you can just scan for a \r or \n and break it up
there. Virtually every encoding you'll encounter today encodes \r and
\n as \r and \n, and will not use those bytes for anything else.

Mike
_______________________________________________

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

  • Follow-Ups:
    • Re: Really big files and encodings
      • From: Seth Willits <email@hidden>
References: 
 >Really big files and encodings (From: Seth Willits <email@hidden>)

  • Prev by Date: Problem implementing keyPathsForvaluesAffecting<Key>
  • Next by Date: Bindings making NSNumberFormatter strange
  • Previous by thread: Re: Really big files and encodings
  • Next by thread: Re: Really big files and encodings
  • Index(es):
    • Date
    • Thread