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?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
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".
Not sure if that's what you're asking, but you can see your encodings by running
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=