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

Pdm help information encountered abnormal characters on Windows. #2678

Closed
1 task done
gaoozi opened this issue Mar 12, 2024 · 7 comments · Fixed by #2684
Closed
1 task done

Pdm help information encountered abnormal characters on Windows. #2678

gaoozi opened this issue Mar 12, 2024 · 7 comments · Fixed by #2684
Labels
🐛 bug Something isn't working

Comments

@gaoozi
Copy link

gaoozi commented Mar 12, 2024

  • I have searched the issue tracker and believe that this is not a duplicate.

This is the result, just run pdm, Some characters similar to Linux color codes appeared :
pdm

@gaoozi gaoozi added the 🐛 bug Something isn't working label Mar 12, 2024
@frostming
Copy link
Collaborator

frostming commented Mar 12, 2024

@gaoozi Can you please check if #2679 fixes the problem because I myself don't have a Windows dev machine.

Also please check if pdm info renders colors correctly

@pawamoy
Copy link
Contributor

pawamoy commented Mar 12, 2024

Try enabling ANSI support on your system, or use a modern terminal emulator such as Terminal by Microsoft.

@gaoozi
Copy link
Author

gaoozi commented Mar 12, 2024

@frostming thinks, I will try tomorrow, pdm info is working properly in the latest version.
@pawamoy thinks, I will try.

@gaoozi
Copy link
Author

gaoozi commented Mar 13, 2024

@frostming I tried #2679 on Windows, but the problem still exists, maybe it's related to console.capture:

pdm2

@frostming
Copy link
Collaborator

@gaoozi while you are on it, can you check if any specific color system fixes the issue?

console = Console(highlight=False, color_system="windows")

Available options are "standard", "256", "truecolor", "windows"

@gaoozi
Copy link
Author

gaoozi commented Mar 13, 2024

@frostming The same problem, using console.print alone is normal, but using it together withconsole.capture will cause problems

@frostming
Copy link
Collaborator

frostming commented Mar 13, 2024

@frostming The same problem, using console.print alone is normal, but using it together withconsole.capture will cause problems

Okay, I think we need to switch to another mechanism for styled help.

At the same time you can try to enable VT on your machine as @pawamoy suggested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
3 participants