• 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
Re: NSString really Unicode?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString really Unicode?


  • Subject: Re: NSString really Unicode?
  • From: "James J. Merkel" <email@hidden>
  • Date: Fri, 12 Mar 2004 22:56:31 -0800

Just to sum up the discussion on this subject.
NSString works with big endian Unicode strings only. If you are reading a file that has little endian strings, you need to do byte swapping before handing the string to an NSString method. The Unicode encoding that should be used is NSUnicodeStringEncoding (not surprising I guess). Also if you want to use a string as a key into a Localizable.strings file, the string should not have trailing NULL characters.

BTW, a straightforward introduction to Unicode is at: http://www.joelonsoftware.com/articles/Unicode.html

Jim Merkel
_______________________________________________
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.


  • Follow-Ups:
    • Re: NSString really Unicode?
      • From: Ondra Cada <email@hidden>
References: 
 >NSString really Unicode? (From: "James J. Merkel" <email@hidden>)
 >Re: NSString really Unicode? (From: "M. Uli Kusterer" <email@hidden>)
 >Re: NSString really Unicode? (From: "James J. Merkel" <email@hidden>)
 >Re: NSString really Unicode? (From: Allan Odgaard <email@hidden>)
 >Re: NSString really Unicode? (From: "James J. Merkel" <email@hidden>)
 >Re: NSString really Unicode? (From: Shawn Erickson <email@hidden>)
 >Re: NSString really Unicode? (From: "James J. Merkel" <email@hidden>)
 >Re: NSString really Unicode? (From: Dustin Voss <email@hidden>)

  • Prev by Date: Re: Leave NSLog()s in Final Product?
  • Next by Date: [ANN] UKKQueue
  • Previous by thread: Re: NSString really Unicode?
  • Next by thread: Re: NSString really Unicode?
  • Index(es):
    • Date
    • Thread