Skip to content

Investigate using UTF-8 console output in docker #82939

@albertzaharovits

Description

@albertzaharovits

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Core/Infra/CoreCore issues without another label:Delivery/PackagingRPM and deb packaging, tar and zip archives, shell and batch scripts>enhancementTeam:Core/InfraMeta label for core/infra teamTeam:DeliveryMeta label for Delivery team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions