gtanner / qrcode-terminal

QRCodes in your terminal, cause thats hot.
Apache License 2.0
1.28k stars 102 forks source link

QR Code problem under screen/xterm #28

Closed suntong closed 6 years ago

suntong commented 6 years ago

screen is the famous VT100/ANSI terminal emulation under *nix, that allows people to run terminal session on the server, after log off, or even after dis-connect.

However, I found that QR Code is not output correctly under screen.

So under the same terminal, and anything else are the same, within & outside screen will print QR Code differently.

In both case, I have:

DISPLAY='localhost:10.0'
LANG='C'

The only difference is within & outside screen (TERM='screen' or TERM='rxvt-unicode-256color').

Ah~, found my local xterm (TERM='xterm') is having the same problem as well. The QR Code is output as:

â
 â
  â
   â
    â
     â
      â
       â
        â
         â
          â
           â
            â
             â
              â
               â
                â
                 â
                  â
                   â
                    â
                     â
                      â
                       â
                        â
                         â
                          â
                           â
                            â
                             â
                              â

â â
   â
    â
     â
      â
        ââ
          â â  ââ âââ
                     â
                      â â
                         â
                          â
                           â
                            â
                              â
â â   â â   âââ
                 ââ â
                     ââ â   â â
â ââ
    â
     â
      â ââ
          ââ â
              âââ ââ ââ ââ
                          â
                           â
                            â â
ââ
  â
   â
    â
     â
      â
       â
        ââ
          â â ââ
                ââ
                  ââ
                    ââ
                      ââ
                        â
                         â
                          â
                           â
                            â
                             â
                              â
ââ
    â
     âââ
        â â â
               â
                â â
                    ââ ââ â
                           â
                            â â
â ââ
    ââââ
         â  â
             â
               ââââââ â
                       â
                        ââââ
                            â
                             ââ
ââââââââ
        ââ â
            â â
               â
                âââ
                   â ââ
                       ââââ
                            âââ
ââ
   â
    â  â
        ââââ
             ââ â â
                   â
                    â
                     â
                       â  ââ
                             â
                              â
ââ â â â
        â
         ââ
            ââ
              â
                 âââ
                    â
                       â â
                           â ââ
ââ
  â ââââ
        â
         â
          ââââââ
                â
                  âââââââ
                         ââ âââ
âââ
   â
    ââ
      ââ
        â
         âââ
            âââââ  ââ â
                       â
                        â
                            âââ
â â
   â
    â
     â
      â
        âââ
           â
            ââââââ
                  â â
                      ââ
                        â  ââ
                             ââ
â â   â ââââ âââ  â
                   ââ  â
                          ââ
                            â
                              â
â ââ
    â
     â
      â â  ââ ââ
                âââ â
                      âââ
                         âââ
                            ââ
                              â
ââ
  â
   â
    â
     â
      â
       â
        ââ
          â
           ââ
             ââââ
                 ââââ
                     â
                      â
                       âââ
                          âââ
                             ââ

Please verify. thx.

suntong commented 6 years ago

NVM. Go it working. Chinese env problem.

Ir001 commented 1 year ago

How to solve this problem? I have the same issue when I use whatsapp-web.js

reyyzzy commented 1 year ago

same here,got any clue?

suntong commented 1 year ago

I really cannot remember how I fixed the problem 4 ~ 5 years ago, but I did remember it was a misconfiguration on my end in my Chinese environment -- fixed my own mistake and the problem went away. Now, 4 ~ 5 year has gone by without anyone reporting any problem, so I'd think what you guys having should be a new problem unrelated with mine.

I'd recommend to start with a newly created account with anything default, and the C.utf8 locale under rxvt-unicode using the latest distro, and see if things work there. Else, please open a new issue and give as much details as possible, instead continue with this closed one.