23 ms·
Absolutely, there's quite a few gaffes in java (other languages have similar issues too): * char being 16bit and thus can't hold a modern unicode character *
by 0x0 11y ago
Absolutely, there's quite a few gaffes in java (other languages have similar issues too):
* char being 16bit and thus can't hold a modern unicode character
* lots and lots of string and byte stream methods that have variants without explicit charset parameters, making it very easy to accidentally have a hidden dependency on the implicit default charset (aka -Dfile.encoding)
* Using strings instead of byte[] for filename values
* Having to deal with UnsupportedEncodingExceptions as checked exceptions whenever referencing the UTF8 encoding
- jfim 11y agoThe reason for char being 16 bits is that the JLS predates Unicode 2.0 (1996), which added 32 bit codepoints. At that time, UCS-2 was widely believed to be sufficient to represent anything "international."