Re: any way to determine the encoding type of an NSData object?
Re: any way to determine the encoding type of an NSData object?
- Subject: Re: any way to determine the encoding type of an NSData object?
- From: p3consulting <email@hidden>
- Date: Sun, 4 Jan 2004 10:15:50 +0100
As a starting point you may read
http://www.macosxguru.net/article.php?story=20030808081801868
Pascal Pochet
P3 Consulting
On 4 janv. 2004, at 08:37, Donald Hall wrote:
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.
_______________________________________________
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.