[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Getting UTF-8 value of string occasionally fails
From: |
Christopher Culver |
Subject: |
Getting UTF-8 value of string occasionally fails |
Date: |
Wed, 13 Oct 2004 04:11:30 -0500 (CDT) |
In developing Charmap I have encountered several Unicode positions
where getting calling -UTF8String on a string consisting solely of
that position's character results in:
"Uncaught exception NSCharacterConversionException, reason: Can't get
UTF8 from Unicode string."
Even clicking on Ignore crashes the application.
An example is U+D800 <Non Private Use High Surrogate, First>. I would
ask anyone interested in this problem to update Charmap from
CVS. Launch it, open the Character Inspector and select the block High
Surrogates. Watch the exception panel pop up. The exception is caused
when the inspector tries to display various representations, for which
in my implementation it is necessary to get its UTF-8 value.
Should U+D800 return a valid UTF-8 string? Is this a bug in base or
correct behavior?
If it's my fault, suggestions for a workaround would be appreciated.
Christopher Culver
p.s. Charmap CVS has a lot of new functionality and little crashiness,
I'd encourage all to check it out.
- Getting UTF-8 value of string occasionally fails,
Christopher Culver <=
- Re: Getting UTF-8 value of string occasionally fails, Pete French, 2004/10/13
- Re: Getting UTF-8 value of string occasionally fails, Alexander Malmberg, 2004/10/13
- -gui Uncaught Exception Handler (Was: Getting UTF-8 value of string occasionally fails), David Ayers, 2004/10/13
- Re: -gui Uncaught Exception Handler (Was: Getting UTF-8 value of string occasionally fails), Alexander Malmberg, 2004/10/13
- Re: -gui Uncaught Exception Handler (Was: Getting UTF-8 value of string occasionally fails), Stefan Urbanek, 2004/10/13
- Re: -gui Uncaught Exception Handler (Was: Getting UTF-8 value of string occasionally fails), David Ayers, 2004/10/14
- Re: -gui Uncaught Exception Handler (Was: Getting UTF-8 value of string occasionally fails), stefan, 2004/10/14
- Re: -gui Uncaught Exception Handler (Was: Getting UTF-8 value of string occasionally fails), David Ayers, 2004/10/14
- Re: -gui Uncaught Exception Handler (Was: Getting UTF-8 value of string occasionally fails), David Ayers, 2004/10/14
Re: -gui Uncaught Exception Handler (Was: Getting UTF-8 value of string occasionally fails), Matt Rice, 2004/10/13