String encoding question
String encoding question
- Subject: String encoding question
- From: Tito Ciuro <email@hidden>
- Date: Sun, 31 Aug 2003 20:07:03 +0200
Hello,
If I use the [NString availableStringEncodings], I obtain the following
value for Western (Mac OS Roman): 23032656
However, NSString.h shows Western (Mac OS Roman) with a value of 30.
If I decode a file like this, I get nil back:
NSString* fileContents = [[NSString alloc] initWithData: fileData
encoding: 23032656];
However, if I decode the file like this, everything is fine:
NSString* fileContents = [[NSString alloc] initWithData: fileData
encoding: NSMacOSRomanStringEncoding];
What's the difference between the two? Why are all these encodings
available through [NString availableStringEncodings] good for?
Thanks,
-- Tito
_______________________________________________
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.