• 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: Working with 32-bit Unicode (NSString stringWithUTF32String: (const UTF32Char *) bytes needed)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Working with 32-bit Unicode (NSString stringWithUTF32String: (const UTF32Char *) bytes needed)


  • Subject: Re: Working with 32-bit Unicode (NSString stringWithUTF32String: (const UTF32Char *) bytes needed)
  • From: Aki Inoue <email@hidden>
  • Date: Mon, 6 Jan 2003 12:55:09 -0800

Andrew,

As Doug mentioned here, you can access the whole 32 bit Unicode space via surrogates.
And we have no plan to change the fundamental concept that NSString/CFString is a wrapper for UTF-16 character array.

We're considering to add direct mapping between UTF-32 bytes to NSString/CFString in the future.

Aki

On 2003.1.6, at 09:44 AM, Douglas Davidson wrote:

On Sunday, January 5, 2003, at 11:50 AM, Andrew Thompson wrote:

I applaud the addition of Unicode 3.2 support in the 10.2 Foundation
release.
NSCharacterSet 's longCharacterIsMember: (UTF32Char) is a great
foundation for starting to explore the higher unicode planes.
(http://www.unicode.org/glossary/#plane).

While a good start, I'm wondering if its possible to work with 32-bit
Unicode in NSStrings. There don't seem to be any 32bit methods on
NSString (everything is UTF8, unichar (16-bit) or char (8 bit)) based.

I imagine re-engineering the whole text system, including
NSLayoutManager et al. to handle 32 bit strings is a very large job,
but I am wondering if there is a way to work with 32 bit string data
today that I've missed?

We use UTF-16, so you can just use surrogate pairs. NSLayoutManager et
al. understand them. I'm not sure if we have anything public for
bulk-converting 32-bit data, though.

By the way, if you're interested in exploring, try the character
palette. You can use it to locate non-BMP characters like
p p "p $p 0p 5p p  and
enter them in your text.

Douglas Davidson
_______________________________________________
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.

  • Follow-Ups:
    • Re: Working with 32-bit Unicode (NSString stringWithUTF32String: (const UTF32Char *) bytes needed)
      • From: Andrew Thompson <email@hidden>
References: 
 >Re: Working with 32-bit Unicode (NSString stringWithUTF32String: (const UTF32Char *) bytes needed) (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: Elegant way to eliminate large conditional?
  • Next by Date: Re: Internet programming, point me?
  • Previous by thread: Re: Working with 32-bit Unicode (NSString stringWithUTF32String: (const UTF32Char *) bytes needed)
  • Next by thread: Re: Working with 32-bit Unicode (NSString stringWithUTF32String: (const UTF32Char *) bytes needed)
  • Index(es):
    • Date
    • Thread