views:

136

answers:

2

I need a representation of µ or "micro". That funny small u with the long tail on the left side. Maybe you can see it here: µ

Some weeks ago I was reading in the docs, that it's a bad idea to type any special characters into the source code. So to prevent problems, could I encode that special character µ somehow like web folks do with  , in an NSString? And if so, is there an overview of these codes or a way to get the correct code?

+1  A: 

Take a look at this thread: http://stackoverflow.com/questions/833822/how-do-i-escape-a-unicode-character-in-my-source-code

NSString *stuff = @"The Greek letter Beta looks like this: \u03b2"
GoldenBoy
+1  A: 

For the iPhone, and for Mac OS X using the Xcode 3.x tool chain (targeting 10.2 or later, which you must be if you're using Xcode 3.x), it is safe and supported to use a literal µ in the string constant. The only caveat is that you must set the -finput-charset command-line option if your source files are not UTF-8 or UTF-16.

Ahruman