Skip to content

Unknown encoding: 65001 #2009

@PetaPetaPeta

Description

@PetaPetaPeta

I am attempting to run docker-compose.exe from Windows in BashOnWindows. Specifically I am running docker-compose.exe --version to verify that it can correctly output data. When doing this I am receiving the following error:

~ # docker-compose.exe --version                                                                                                                                                                                                  
Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose\cli\main.py", line 66, in main
  File "compose\cli\main.py", line 98, in dispatch
  File "compose\cli\docopt_command.py", line 25, in parse
  File "compose\cli\docopt_command.py", line 12, in docopt_full_help
  File "site-packages\docopt.py", line 575, in docopt
  File "site-packages\docopt.py", line 484, in extras
LookupError: unknown encoding: cp65001
Failed to execute script docker-compose
------------------------------------------------------------

I can see that codepage 65001 is the Windows codepage for UTF-8 encoding, but that this is not supported in Unix systems. A solution to this is to run the command chcp.com 437 to change to a different codepage. This solution is however not good as it removes the support for UTF-8 in the terminal.
The issue should be persistent across different Windows applications that attempt to output any text in encoding 65001.

Windows build number: Microsoft Windows [Version 10.0.15063]

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