public class CharsetDefs
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.nio.charset.Charset |
DEFAULT
The default charset used for command and rpc header / key encodings when nothing
else has been specified.
|
static java.lang.String |
DEFAULT_NAME
The canonical name of the default charset.
|
static java.nio.charset.Charset |
LOCAL
The current "local" JVM charset, as taken from the JVM itself.
|
static java.lang.String |
LOCAL_NAME
The canonical name of the local JVM charset.
|
static java.nio.charset.Charset |
UTF16
UTF-16 charset.
|
static java.lang.String |
UTF16_NAME
Canonical name of the UTF-16 charset we use.
|
static java.nio.charset.Charset |
UTF8
UTF-8 charset.
|
static java.lang.String |
UTF8_NAME
Canonical name of the UTF-8 charset we use.
|
Constructor and Description |
---|
CharsetDefs() |
public static java.nio.charset.Charset DEFAULT
This charset must have US ASCI as a proper subset, but other than that, it's not always clear what's the best default charset. Contenders include ISO-8859-1, ISO-8859-15, windows-1252 (aka winansi); with minor issues, they'll all work, but those minor issues include things like euro sign misplacement, odd ligature screwups, etc. In the absence of anything better (or anything defined through the properties system), we currently use the JVM's default charset, since it's at least available, but this is certainly subject to further research and / or rethinking.
Note that despite being tagged a constant, it's actually set dynamically in the static constructor below.
public static java.lang.String DEFAULT_NAME
public static final java.nio.charset.Charset UTF8
public static final java.lang.String UTF8_NAME
public static final java.nio.charset.Charset UTF16
public static final java.lang.String UTF16_NAME
public static final java.nio.charset.Charset LOCAL
public static final java.lang.String LOCAL_NAME