TeraTermProject / teraterm

Other
414 stars 34 forks source link

QR codes not shown in a usable fashion #251

Closed Donner-Party closed 3 weeks ago

Donner-Party commented 3 weeks ago

When using Teraterm to set up PiVPN, it does not display QR codes properly, no matter what font I have tried.

It does display properly in Windows 11 ssh client.

Can this be fixed or is there a specific font I should be using?

Example of PiVPN QR code: https://it.giffen.cloud/2020/04/05/setup-pivpn-endpoint-device/

zmatsuo commented 3 weeks ago

Hi

same issue?

Check the character encoding.

$ qrencode -t ansiutf8 https://teratermproject.github.io/

█████████████████████████████████████
█████████████████████████████████████
████ ▄▄▄▄▄ █▀█ █▄   ▀██▄ █ ▄▄▄▄▄ ████
████ █   █ █▀▀▀█ ▄▀ █▀ ▄██ █   █ ████
████ █▄▄▄█ █▀ █▀▀██▄▄ ▄▄ █ █▄▄▄█ ████
████▄▄▄▄▄▄▄█▄▀ ▀▄█ █ █ █ █▄▄▄▄▄▄▄████
████▄  ▄ █▄▄ ▄▀▄▀▀▀▀█▄▀▀▀▄▀ ▀▄█▄▀████
████▀▀ ▄▄█▄▄▀█▄█▀ ▄▄ ▄█▀█▀█▄ ▀█▀█████
████ █ ▄▀█▄█▀ ▄█▄█▄██ ▀ ▀▀▀▀▀▄▄█▀████
████  ▀▄▀ ▄██ █ ▄█▀▄ █▄▀ ███▀▄▄▀█████
████▀ ▄▀█▀▄█▀ ▀▄▀▀▀█▀▄█ ▀█▀ ▀▄ █▀████
████ █▄▀▄█▄ ▀▀██▀ ▄ ▄█▀▀█ ▀  █▄▀█████
████▄█▄█▄█▄█▀ ▀█▄█▄█▀ ▀▀ ▄▄▄ ▀   ████
████ ▄▄▄▄▄ █▄█▀ ▄█▀▄▀█   █▄█ ▄▄▀▀████
████ █   █ █  █▄▀▀▀██▄██▄▄▄▄▄▀  ▀████
████ █▄▄▄█ █ ▀██▀ ▄▄███▀▀▄ ▄  ▄ █████
████▄▄▄▄▄▄▄█▄███▄█▄▄█▄█▄███▄▄▄▄██████
█████████████████████████████████████
█████████████████████████████████████

For correct display, please set character encoding to UTF-8. see setup - additional settings - coding tab and set UTF-8.

from man page

       -t    {PNG,PNG32,EPS,SVG,XPM,ANSI,ANSI256,ASCII,ASCIIi,UTF8,UTF8i,ANSI‐
       UTF8,ANSIUTF8i,ANSI256UTF8}

ASCII can usually be displayed correctly. (But it is difficult to read with a qr code reader.)

$ qrencode -t ASCII https://teratermproject.github.io/

        ##############      ##  ########      ####  ##############
        ##          ##  ##  ##    ########      ##  ##          ##
        ##  ######  ##          ####  ##    ####    ##  ######  ##
        ##  ######  ##  ######  ##  ####  ####      ##  ######  ##
        ##  ######  ##    ##          ############  ##  ######  ##
        ##          ##  ####  ####        ##    ##  ##          ##
        ##############  ##  ##  ##  ##  ##  ##  ##  ##############
                          ######    ##  ##  ##  ##
        ##########  ########  ##          ##      ##  ##  ##  ##
          ####  ##      ##  ##  ########    ######  ######      ##
            ######  ####    ##    ##########          ####
        ######          ##      ####    ##    ##  ##    ####  ##
        ##  ####    ##    ####  ##  ##    ##  ##          ####
        ##  ##  ##      ####              ################      ##
        ####  ##  ####    ##  ####    ####  ##  ##        ####
        ######  ####      ##  ##    ##  ##    ####      ##    ##
          ####      ##    ##  ##          ##  ##      ##  ####
        ####  ##  ##    ######  ######  ##    ####  ######  ##  ##
        ##  ##  ##  ####          ########        ##  ####  ##
        ##    ##      ######    ####  ##    ####  ########    ##
        ##  ##  ##  ##    ##    ##  ##    ##    ##########  ######
                        ######          ##########      ##########
        ##############  ##    ####    ##    ######  ##  ######
        ##          ##      ####    ##  ##  ######      ##    ####
        ##  ######  ##  ####  ##          ##    ##########  ####
        ##  ######  ##  ####    ######                    ########
        ##  ######  ##  ##        ######          ##############
        ##          ##  ####    ####          ####  ##  ####  ##
        ##############  ##      ##  ####  ##  ##      ########
Donner-Party commented 3 weeks ago

With the -t option, it still does not display correctly in Teraterm. I should have mentioned it does display correctly if I use Windows command line SSH. image

However, I did find this at the pivpn website and it works: image

image

Teraterm is set for UTF-8: image

zmatsuo commented 3 weeks ago

Please use Tera Term 5.2.

Set as follows.

image

Displayed

image

When Ambiguous Characters width=2cell or Tera Term 4.x

image

Donner-Party commented 3 weeks ago

Thanks! That helped, it is working now.

I also had to change the font to Consolas. I had been using Lucida Sans Typewriter.