At 16:06 -0700 30/07/10, [email protected] wrote: >From: Dave DeLong <[email protected]> >Date: Fri, 30 Jul 2010 16:09:22 -0600 >Message-ID: <[email protected]> >... >Given a file, how can I determine the NSStringEncoding of the file, without >reading the entire file into memory? (If the file isn't a text file, then >defaulting to NSUTF8StringEncoding is just fine, since my code will only work >properly if I'm working with text files anyway)
Beyond what others have already answered, one example heuristic can be found in this sample code: http://brockerhoff.net/src/FolderSweep.zip check the last method in AppController.m. HTH, -- Rainer Brockerhoff <[email protected]> Belo Horizonte, Brazil "In the affairs of others even fools are wise In their own business even sages err." Blog: http://brockerhoff.net/blog _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
