Skip to content

[gdb] Python output encoded incorrectly with non-ASCII #29896

@AnyOldName3

Description

@AnyOldName3

Description / Steps to reproduce the issue

  • gdb
  • Within GDB, run python print("\u00a7"). It prints ┬º.
  • Exit GDB with exit, then run python -c 'print("\u00a7")'. It prints §.

Expected behavior

Both tests should print §.

Actual behavior

Within GDB, it prints ┬º. Outside of GDB, it prints §.

Verification

Windows Version

MINGW64_NT-10.0-19045

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANGARM64

Are you willing to submit a PR?

I failed to find the root cause as it's none of the obvious suspects, so a PR from me is unlikely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions