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):
Windows Terminal (both symbols correct):
Windows Charmap (look at the unicode):
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
returnsLANG=en_GB.UTF-8
(as well asLC_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.