Default Characterand Stringuse UTF-16, but, for all practical purposes, in North America and most of the English UTF-8 locale is sufficient (as it can go up to 4 bytes). So, if I use InputStreamReader(InputStream), does this give me the default UTF-16 encoding char? Using InputStreamReader(InputStream, "UTF-8")would provide UTF-8 encoding, which would be sufficient for my purpose.
How can I automatically set the default JVM encoding to UTF-8 when using English? The goal is to improve performance for Characterboth Stringmanipulation (using an 8-bit scheme instead of 16-bit encoding, and most ASCII is covered using 8-bit encoding and at the same time conforms to the Unicode standard).
Any comments are welcome. Thanks!
source
share