• 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: How to get an NSString from a non-terminated array of unicode chars (length is known)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get an NSString from a non-terminated array of unicode chars (length is known)


  • Subject: Re: How to get an NSString from a non-terminated array of unicode chars (length is known)
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 4 Mar 2008 08:13:19 -0800


On 3 Mar '08, at 11:00 PM, Stuart Malin wrote:

The library defines an XML_Char type, so my code below refers to that, but XML_Char is wchar_t (which, I believe is UTF8 on a Mac).

No. It's UTF-16. (UTF-8 is an 8-bit encoding, a superset of ASCII where characters >127 are encoded as multiple bytes.)


Use -[NSString initWithCharacters:length:].

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How to get an NSString from a non-terminated array of unicode chars (length is known) (From: Stuart Malin <email@hidden>)

  • Prev by Date: Re: Relaunching an application
  • Next by Date: Re: Tabless NSTabView IB3 Bug
  • Previous by thread: Re: (Resolved) How to get an NSString from a non-terminated array of unicode chars (length is known)
  • Next by thread: Re: How to get an NSString from a non-terminated array of unicode chars (length is known)
  • Index(es):
    • Date
    • Thread