Re: Determine encoding of file
Re: Determine encoding of file
- Subject: Re: Determine encoding of file
- From: Martin Wierschin <email@hidden>
- Date: Fri, 30 Jul 2010 16:20:40 -0700
Given a file, how can I determine the NSStringEncoding of the file,
without reading the entire file into memory?
Some files may have a text encoding attribute set, which you can read
using getxattr and "com.apple.textEncoding". Probably you won't have
the luxury of just using that API, but since it hadn't been mentioned
yet I wanted to bring it up.
The most important thing is that you let your users override whatever
heuristic you choose as a default.
~Martin
_______________________________________________
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