javac says
If the -encoding option is not specified, then the platform default converter is used.
I guess the default encoding in Linux is UTF-8, how to get the default encoding in Linux?
javac says
If the -encoding option is not specified, then the platform default converter is used.
I guess the default encoding in Linux is UTF-8, how to get the default encoding in Linux?
javac
will use the default encoding with which it has been configured. Often this corresponds to whatever your system's default locale "codeset" happens to be, but there actually is no guarantee that they are the same. The JVM does not pay attention to the locale environment variables.
The term "codeset" is (almost) synonymous with "charset set" or "encoding".
Further reading:
Not sure if that's what you're asking, but you can see your encodings by running locale
. Example:
malice@Haskell ~ $ locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
locale
does not show the encoding, but the encoding-name is by convention part of the locale settings.
Commented
Dec 24, 2015 at 12:41