Why is the length of this string longer than the number of characters in it?

Everyone else is giving the surface answer, but there’s a deeper rationale too: the number of “characters” is a difficult-to-define question and can be surprisingly expensive to compute, whereas a length property should be fast. Why is it difficult to define? Well, there’s a few options and none are really more valid than another: The … Read more

iOS Localization: Unicode character escape sequences, which have the form ‘\uxxxx’ does not work

NSString literals and strings-files use different escaping rules. NSString literals use the same escape sequences as “normal” C-strings, in particular the “universal character names” defined in the C99 standard: \unnnn – the character whose four-digit short identifier is nnnn \Unnnnnnnn – the character whose eight-digit short identifier is nnnnnnnn Example: NSString *string = @”Espa\u00F1ol – … Read more

What is the range of Unicode Printable Characters?

See, http://en.wikipedia.org/wiki/Unicode_control_characters You might want to look especially at C0 and C1 control character http://en.wikipedia.org/wiki/C0_and_C1_control_codes The wiki says, the C0 control character is in the range U+0000—U+001F and U+007F (which is the same range as ASCII) and C1 control character is in the range U+0080—U+009F other than C-control character, Unicode also has hundreds of formatting … Read more