News for hackers. Stuff that matters.
Re:The UTF-8-Everywhere Manifesto by __david__ on Sunday April 29, 2012 @03:12PM (#3906732)
NSStrings are opaque--you always call accessor functions and never have access to the low level backing store. The reason they are good is that you can't get data into or out of them without specifying an encoding, which leaves the actual encoding of the backing store as an implementation detail.

The fact is, I don't even know (or see documented) that the backing is UTF-16--Apple is free to change that at their whim and no user programs would break.

Re:The UTF-8-Everywhere Manifesto by brigade on Sunday April 29, 2012 @05:51PM (#3907250)
It's not documented (presumably) for that very reason.

In fact, the opposite is implied by initWithBytesNoCopy:length:encoding:freeWhenDone: - it should be possible right now to have NSStrings with arbitrary internal representations, even if most other creation methods currently convert to UTF16.

Re:The UTF-8-Everywhere Manifesto by cobbal on Sunday April 29, 2012 @05:59PM (#3907266)
Unfortunately, this isn't entirely true.

  - (unichar)characterAtIndex:(NSUInteger)index
will return the UTF-16 "characters" (codepoints or half-codepoints)