3 ms·
And thanks to Java popularizing UTF-8. Java was the major language to support Unicode natively. The lack of Unicode support in C++ was disappointing. (Yes, U
by ww520 13y ago
And thanks to Java popularizing UTF-8. Java was the major language to support Unicode natively. The lack of Unicode support in C++ was disappointing.
(Yes, UTF-8 hack is nothing compared to Huffman coding. The Deflate compression algorithm using Huffman coding to encode the LZ77 output and the Huffman encoding table itself is another notch up on the hacking coolness scale.)
- sanderjd 13y agoIs this right? Doesn't Java use UTF-16 internally?
- rspeer 13y agoAnd Java's first attempt to implement UTF-8, the one they called "UTF8", is not UTF-8. It's almost but not quite CESU-8. It will probably fuck up your astral characters (like emoji). The real Java UTF-8 is, intuitively, named "AL32UTF8".
- davidgerard 13y agoAnd then there's the unremitting horror that MySQL calls UTF-8, properly known as WTF-8.
- rspeer 13y agoI'd want to save the name "WTF-8" for that case where someone takes some text encoded as UTF-8, decodes it as if it's in a single-byte encoding, and then encodes the resulting mojibake as UTF-8 again. Double UTF-8. WTF-8.
- shadowmatter 13y agoFrom http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Ch...: "The native character encoding of the Java programming language is UTF-16." That said, at least they adopted a Unicode encoding, and helped it establish mindshare.