Re: "Platform default encoding"
On Mar 2, 2:04 pm, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
On 2 Mar 2011 01:23:17 GMT, r...@zedat.fu-berlin.de (Stefan Ram) wrote,
quoted or indirectly quoted someone who said :
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4175635
This is a spurious bug. The author did not understand what the
file.encoding system property was for.
Well, Roedy, obviously Stefan posted the link so the OP could read,
"- The java.nio.charset.Charset class description now mentions that
'Every instance of the Java virtual machine has a default charset,
which may or may not be one of the standard charsets. The default
charset is determined during virtual-machine startup and typically
depends upon the locale and charset being used by the underlying
operating system.'
"- The same class also offers a method defaultCharset, which lets an
application find out about the actual default encoding.
"- The String and InputStreamReader specifications refer to the
Charset
class multiple times.
"There are still some gaps though - for example, the javac
documentation
refers to "platform default converter" with no explanation what that
is.
"The file.encoding is intentionally not documented in the platform
specification. It's an implementation detail of Sun's JREs, and
applications should not rely on it. See bug 4163515."
Of course, some folks who frequent this newsgroup get their knickers
in a twist any time someone suggests they read another link or do a
little research on their own, and scream, rant, cry and hold their
breath until they turn purple until someone spoon-feeds them the
answer, which they then misinterpret and argue against and complain
that Python does it better.
So for those folks I spoon-feed you the relevant parts of the
referenced link.
--
Lew