4

So many questions and answers about PuTTY and UTF-8 encoding...

Let me summarize: I'm using a patched Nerd Font (https://github.com/ryanoasis/nerd-fonts). It displays fine for most special characters, but some just don't display correctly in PuTTY. They display fine via Windows Terminal, Notepad etc.

PuTTY (first symbol wrong, second ok):
enter image description here

Windows Terminal (both symbols correct):
enter image description here

Windows Charmap (look at the unicode):
enter image description here

As you can see unicode 0xF0E7 should be a flash-symbol, but PuTTY somehow displays a gothic character. Also when I copy&paste the character from the PuTTY window it is the þ, not the flash-icon. Somehow PuTTY changed the unicode codepoint? þ is 0x00FE not 0xF0E7! Also note that PuTTY does display other special characters just fine like the folder-symbol or the heart-symbol in the screenshots.

My settings:

Putty

  • Window > Appearance > Font: Some Nerdfont & Allow selection of variable-pitch fonts
  • Window > Appearance > Font Quality: ClearType
  • Window > Translation > Remote charset: UTF-8
  • Window > Translation > Drawing Characters: Use Unicode line drawings

Bash

  • locale returns LANG=en_GB.UTF-8 (as well as LC_ALL=en_GB.UTF-8)

TMUX

  • set -g default-terminal "screen-256color"
  • setw -q -g utf8 on

When I ssh into the box via Windows Terminal everything is working as expected, also via tmux. Only when I use PuTTY some UTF-8 characters are replaced.

1 Answer 1

0

Hi there is an good solution with DejaVu. Download and install DejaVu (https://github.com/dejavu-fonts/dejavu-fonts) In putty under "Apperance" "Font settings" select "DejaVu Sans Mono, 10tp regular". Then it will work.

Source: https://superuser.com/questions/393834/how-to-configure-putty-to-display-these-characters

1
  • I'm using a patched font already as stated in the OP.
    – Dennis G
    Commented Jul 23, 2022 at 19:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .