ConEmu icon indicating copy to clipboard operation
ConEmu copied to clipboard

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

Open kkhaveabigdream opened this issue 1 year ago • 6 comments

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 avatar Mar 04 '24 09:03 kkhaveabigdream

Any suggestions? I need help :(

kkhaveabigdream avatar Mar 05 '24 06:03 kkhaveabigdream

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

kkhaveabigdream avatar Mar 08 '24 03:03 kkhaveabigdream

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

Maximus5 avatar Mar 21 '24 23:03 Maximus5

dump.zip @Maximus5

kkhaveabigdream avatar Mar 25 '24 07:03 kkhaveabigdream

@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 avatar Mar 26 '24 06:03 kkhaveabigdream

dump2.zip

kkhaveabigdream avatar Mar 26 '24 06:03 kkhaveabigdream