any way to determine the encoding type of an NSData object?
any way to determine the encoding type of an NSData object?
- Subject: any way to determine the encoding type of an NSData object?
- From: Donald Hall <email@hidden>
- Date: Sun, 4 Jan 2004 00:37:38 -0700
I want to load data from files that are either encoded with
NSMacOSRomanEncoding or NSUnicodeEncoding. I am converting the
documents my program creates to use Unicode so that say Japanese
users can use Kanji characters. Existing users will have documents
saved as MacOSRoman and they won't be able to correctly open them in
the new version of my program.
I'm using the NSDocument method:
- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)type
Is there a way to determine what encoding type was used when the
document was saved? NSData does not seem to have a way to determine
this.
Am I going to have to supply a separate conversion utility?
Thanks,
Don
--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
email@hidden
http://www.appsandmore.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.