Package com.perforce.p4java
Class CharsetDefs
java.lang.Object
com.perforce.p4java.CharsetDefs
Provides a centralized place to define or specify the various default and
working charsets used in the P4Java implementation. Do not change the values
here unless you're absolutely certain you know what you're doing, as the
definitions here are used deep in the implementation layers to decode RPC
packet headers, etc., as well as more normal file contents and command
encodings.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic CharsetThe default charset used for command and rpc header / key encodings when nothing else has been specified.static StringThe canonical name of the default charset.static final CharsetThe current "local" JVM charset, as taken from the JVM itself.static final StringThe canonical name of the local JVM charset.static final CharsetUTF-16 charset.static final StringCanonical name of the UTF-16 charset we use.static final CharsetUTF-8 charset.static final StringCanonical name of the UTF-8 charset we use. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT
The default charset used for command and rpc header / key encodings when nothing else has been specified.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.
-
DEFAULT_NAME
The canonical name of the default charset. Actually set in the static class constructor. -
UTF8
UTF-8 charset. Used for Unicode encodings between the Perforce server and client. Do not change this... -
UTF8_NAME
Canonical name of the UTF-8 charset we use. -
UTF16
UTF-16 charset. -
UTF16_NAME
Canonical name of the UTF-16 charset we use. -
LOCAL
The current "local" JVM charset, as taken from the JVM itself. This is the charset that will be used by the JVM to encode and decode strings if no other encoding is supplied. -
LOCAL_NAME
The canonical name of the local JVM charset.
-
-
Constructor Details
-
CharsetDefs
public CharsetDefs()
-