String.getBytes() relies on the default encoding, but
this encoding is not specified. Of course, the encoding
depends on the platform and can't be the same worldwide.
However, we don't specify how the default file encoding
is set, when it is set, or how a developer can determine
its value.
Does the default file encoding depend on the file.encoding
System.property? What methods use the default file encoding?
The API specs don't say.
The file.encoding System property is not specified, or even
mentioned in the API specs. (See System.getProperties)
The default file encoding touches a number of areas:
* the -encoding flag of the javac compiler
* String.getBytes(String enc)
* String(byte[] byteArray, String enc)
* InputStreamReader.getEncoding()
* InputStreamReader( InputStream in, String enc)
* UnsupportedEndodingException
File encodings vary considerably around the world,
so this is significant in terms of internationalization.
this encoding is not specified. Of course, the encoding
depends on the platform and can't be the same worldwide.
However, we don't specify how the default file encoding
is set, when it is set, or how a developer can determine
its value.
Does the default file encoding depend on the file.encoding
System.property? What methods use the default file encoding?
The API specs don't say.
The file.encoding System property is not specified, or even
mentioned in the API specs. (See System.getProperties)
The default file encoding touches a number of areas:
* the -encoding flag of the javac compiler
* String.getBytes(String enc)
* String(byte[] byteArray, String enc)
* InputStreamReader.getEncoding()
* InputStreamReader( InputStream in, String enc)
* UnsupportedEndodingException
File encodings vary considerably around the world,
so this is significant in terms of internationalization.
- relates to
-
JDK-4246614 Can not change the default encoding for InputStreamReader
-
- Closed
-