special characters [second time]

How can I print special characters (copyright symbol, TM, arrows, smiley faces, ...) on a UILabel? Is there a table with all special characters I can use? Thanks

iPhone, Mac OS X (10.5.4)

Posted on Aug 27, 2008 6:51 AM

Reply
11 replies

Aug 27, 2008 5:08 PM in response to zdanev

Open a program that has an edit menu, like TextEdit. Click Edit -> Special Characters. Make sure at the top you have "View: All Characters" and "by Category" tab selected. Look in the left panel under "Symbols" then "Numbers and Number Symbols". Scroll down to find super- and sub-script digits (0-9). Hover your mouse over one to find the UTF8 code. For example, subscript-0 is "E2 82 80".

To use it in code, do something like this:
NSString *sub0 = @"₀";

Aug 27, 2008 7:08 PM in response to RickMaddy

I'm simply referencing the Apple documentation:
Strings and Non-ASCII Characters

"It is not safe to include high-bit characters in your source code"

I think it's probably to avoid problems when editing code on multiple machines or different editors. ASCII is universal, but multibyte chars have the potential to be corrupted if they are directly in your code and you use an editor that doesn't support them.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

special characters [second time]

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.