Skip to content

Python cannot start in locale zh_TW.euctw #91992

Open
@serhiy-storchaka

Description

@serhiy-storchaka
$ LC_ALL=zh_TW.euctw ./python
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = './python'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  is in build tree = 1
  stdlib dir = '/home/serhiy/py/cpython/Lib'
  sys._base_executable = '/home/serhiy/py/cpython/python'
  sys.base_prefix = '/usr/local'
  sys.base_exec_prefix = '/usr/local'
  sys.platlibdir = 'lib'
  sys.executable = '/home/serhiy/py/cpython/python'
  sys.prefix = '/usr/local'
  sys.exec_prefix = '/usr/local'
  sys.path = [
    '/usr/local/lib/python311.zip',
    '/home/serhiy/py/cpython/Lib',
    '/home/serhiy/py/cpython/build/lib.linux-x86_64-3.11-pydebug',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
LookupError: unknown encoding: EUC-TW

Current thread 0x00007f1f24b4b280 (most recent call first):
  <no Python frame>

It is one of standard glibc locales. Other unsupported locales are hy_AM.armscii8 and ka_GE.georgianps, but I suppose they are less used, and there is no much official documentation available for that encodings.

[edit @StanFromIreland/@encukou] Another unsupported locale is IBM-943 (Japanese shift_jis) (#130228)

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-unicodetype-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    Status

    No status

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions