March 2005

How to code a NSString with UTF-8 ?

The Xcode editor lets you define a file encoding as UTF8. You can then type in a line like:
NSString *foo = @"blah blah";
where blah blah have Unicode characters in them with encoded as UTF8.
But, when I ask this string for its characters I get garbage back, and length is not correct.
More...

Redirect NSLog()

Does anyone know how to redirect NSLog() output? So far, the output goes into XCode's run log window. I would like to redirect it to a text file…
More...