News for hackers. Stuff that matters.
Re:UTF-8 – "The most elegant hack" by evincarofautumn on Saturday September 28, 2013 @08:00PM (#6463549)
> You have to go all the way to UTF-32 to get back to a fixed width encoding.

UTF-21, actually, as there are no code points above 0x10FFFF. Powers of two have other nice properties, though.

Re:UTF-8 – "The most elegant hack" by ygra on Monday September 30, 2013 @01:30AM (#6467974)
There is no UTF-21. The number after UTF signifies the size of the code unit, which in UTF-32 is 32 bits wide. That code points are only defined up to U+10FFFF is irrelevant for that; the code unit is still 32 bits.
Re:UTF-8 – "The most elegant hack" by evincarofautumn on Monday September 30, 2013 @02:52AM (#6468162)
Yeah, I was joking. UTF-32 is a waste of 11 perfectly good bits[1], so you could just as well write each code point as 21 bits (0o0000000–0o7777777), and call it UTF-21. 24 bits (3 × 0x00–0x7F) would be fine too, but 21 is the smallest possible fixed-width Unicode encoding.

[1]: https://github.com/evincarofautumn/protodata