Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The lines containing Chinese characters display strange color blocks when running a CLI app based on Python and prompt_toolkit in ConEmu #2573

Open
kkhaveabigdream opened this issue Mar 4, 2024 · 6 comments

Comments

@kkhaveabigdream
Copy link

Versions

ConEmu build: 230724 x64
OS version: Windows 11 Professional Tranditional Chinese Edition x64
Used shell version : cmder 1.3.24.236

Problem description

When running a Python CLI app based on prompt_toolkit in cmder, there are strange color blocks in the UI. It appears to be a problem with Chinese character parsing, as lines containing Chinese characters render with color blocks exceeding their expected length. However, this issue does not occur in PowerShell

Actual results

4

Expected results

6

result in the [RealConsole] by Ctrl-Win-Alt-Space

5

@kkhaveabigdream
Copy link
Author

Any suggestions? I need help :(

@kkhaveabigdream
Copy link
Author

By unchecking the TrueColor mode, I solved the problem. It can also be solved by setting the bg color as ANSI color.

@Maximus5
Copy link
Owner

Could you attach screen dump? (SysMenu -> Debug -> Dump screen)

@kkhaveabigdream
Copy link
Author

dump.zip
@Maximus5

@kkhaveabigdream
Copy link
Author

@Maximus5 Additionally, there is another issue: there is a chance that when I exit my program, characters from the exit dialog box may remain, which shouldn't happen.
dump3
Error result when app exits:
dump2
Expected result when app exits:
result

@kkhaveabigdream
Copy link
Author

dump2.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants