> On Apr 17, 2016, at 1:19 AM, Jens Alfke <j...@mooseyard.com> wrote:
> 
>> 
>> On Apr 16, 2016, at 7:35 PM, Daryle Walker <dary...@mac.com 
>> <mailto:dary...@mac.com>> wrote:
>> 
>> If the given method is used to read in a pure ASCII file, will the encoding 
>> be set to ASCII?  Or could the method return a superset encoding (like 
>> Latin-1, MacRoman, or UTF-8)?
> 
> I don’t know; you could try it out, of course, but it sounds like the sort of 
> undefined behavior you shouldn’t rely on.
> 
> If you’re trying to determine if the string is pure ASCII, you can use 
> -rangeOfCharactersInSet: to look for anything above 127.

Or -canBeConvertedToEncoding:.

Charles

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to