Skip to content

Set the locale to C.UTF-8 for Python 3 #13

@rspeer

Description

@rspeer

Python 3 uses Unicode everywhere, which makes it inconvenient to use in an environment that claims not to support Unicode, such as these Docker images. The system I/O encoding ends up being "ascii", which means (for example) that non-ASCII strings simply can't be used with the print() function.

Usually, on Debian, the system's default locale would have set the encoding to UTF-8, but locales aren't installed.

The issue is easily fixed by adding one line to a Dockerfile, but I think it should be there in the Python 3 image itself so it doesn't catch people by surprise.

The line to add is:

ENV LANG C.UTF-8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy