Skip to content

Traceback colors are shifted when the line contains wide unicode characters #130273

Description

@HarryLHW

Bug report

Bug description:

Image

In #28150, the carets' positions are compatible with wide unicode characters. I believe the colors should also be compatible.

CPython versions tested on:

3.13, CPython main branch

Operating systems tested on:

Windows, macOS

Linked PRs

Activity

  1. shenxianpeng commented on Feb 18, 2025

    @shenxianpeng
    Contributor

    Not sure if this borderline case 啊哈 = 1/0####### is necessary. If use Unicode to replace Chinese characters, there is no color shift.

    Image

  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Feb 21, 2025
  3. added a commit that references this issue on Dec 10, 2025
    72ffc53
  4. added a commit that references this issue on Jan 28, 2026
    306a690
  5. added a commit that references this issue on Apr 7, 2026
  6. added a commit that references this issue on Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltopic-unicodetype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions