Unihan.txt provides text files showing characters in the format U+XXXX.
If I scan these in, naturally I can obtain the NSString representation XXXX. But I need to convert this text to genuine unichars OR NSStrings (the actual characters represented).

Two questions:

1. I didn't see any relevant conversion methods under NSString or NSNumber. Are there Cocoa functions to perform this easily?

2. I am assuming I have to convert to the format '0xXXXX', but is it also possible to work with U+XXXX directly in cocoa? I got error messages for all of the following formats:

unichar uch = 'U+XXXX';
unichar uch = '0xXXXX';
unichar uch = '\uXXXX';
NSString uch = @"\uXXXX";


So I'm a bit confused about how to get from the four numbers XXXX to a meaningful NSString or unichar representation.

Thanks.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to