claudiodangelis/qrcp

New Bug to show the QRcode in CMD (old verison)

ilaoyao opened this issue · 2 comments

I'm opening this issue because:

  • I have found a bug

OS: Windows 23H2
qrcp version: 0.11.0

In fact, this bug existed from the beginning, the cause has been analyzed, and there also have a temporary solutions:

Situation description

  1. Use the old version of cmd to open the QR code (not Windows Terminal, but a cmd console like win7)
  2. The generated QR code will be deformed and cannot be recognized when scanned with a mobile phone.

Temporary solution

  1. The temporary solution is: chcp 437, modify the code page and replace it with a consolas mono font eg. Consola. At this time, the QR code will be displayed correctly.
  2. Because the cmd code page of the Chinese system is 936, the Consola font cannot be replaced under 936. just like Simsun or Simhei

Disadvantages of temporary solutions
After passing chcp 437, some script files with Chinese content will generate garbled characters when running. Although it can be restored through chcp 936, but it is cumbersome.

So I would like to ask if there is a solution to this situation (under Chinese windows system)

screenshot:
001
002

Hello, unfortunately there is very little we can do for this.
Did you try passing the --browser flag? This flag will open a browser tab and display the QR as an image.
Let me know if this helps, thanks!

Claudio

The --browser parameter is effective.
But what I am talking about should be caused by the system console code page, especially in some countries in Asia, like China where I am.
Maybe this is an innate problem with MS cmd.

I will close this issue.
thank you for your reply.

ilaoyao