Wiki Markup |
---|
Every Java platform has a default character encoding. The available encodings are listed in the Supported Encodings document \[[Encodings 062006|AA. Java References#Encodings 06]\]. The default encoding is used when a character is converted to a sequence of bytes and _vice versa_. If characters are converted into an array of bytes to be sent as output, transmitted across some medium, input and converted back into characters, then the same encoding must be used on both sides of the conversation. |
According to the Java API [API 062006] for the String
class:
The length of the new
String
is a function of the charset, and hence may not be equal to the length of the byte array. The behavior of this constructor when the given bytes are not valid in the given charset is unspecified.
...
References
Wiki Markup |
---|
\[[Encodings 062006|AA. Java References#Encodings 06]\] |
...