-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Description
This issue is only concerned with the encoding of the stdout/stderr streams for docker run -it
.
The JVM has internal logic to deduce the character encoding to use for its display to stdout/stderr, which is influenced by the system locale configuration. Some information on this logic is available at JEP 400: UTF-8 by Default.
On every platform there are probably good (or obscure) reasons to default to non-UTF-8
. We shoud not mess with that.
But, from my testing, the stdout encoding for the JVM inside docker run -it
is US-ASCII
even if it is UTF-8
if the same JVM (ES node) is run on the host (I can force the encoding in docker to UTF-8 by setting -e "LC_ALL=C.UTF-8").
I would like to propose that we affect the docker JVM's encoding based on the host's terminal preferred encoding (locale setting).
Rationale for UTF-8:
In some circumstances it is desirable to output flashy Unicode characters to highlight auto-generated configuration in the terminal, ala Display security auto-configuration with fancy unicode