• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
String encoding question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Drawing text "with NSText"
  • Next by Date: Re: Moving to Keyed Archiving
  • Previous by thread: Re: Drawing text "with NSText"
  • Next by thread: HERE'S HOW: distinguish old archives from keyed archives
  • Index(es):
    • Date
    • Thread