When working with international text data or special Unicode characters through SSH connections, many developers encounter rendering issues in PuTTY. The problem typically manifests as replacement boxes or incorrect glyphs appearing where UTF-8 characters should display.
Before adjusting PuTTY settings, ensure your environment meets these prerequisites:
- Server-side locale supports UTF-8 (check with
locale
command) - Terminal emulator capable of UTF-8 rendering
- Font with proper Unicode coverage
Here's the complete configuration process for proper UTF-8 support:
1. Open PuTTY Configuration
2. Navigate to: Window -> Translation
3. Set "Remote character set" to UTF-8
4. Under Appearance -> Font:
- Select a Unicode font (e.g., "Consolas", "DejaVu Sans Mono")
- Check "Allow selection of variable-pitch fonts"
5. Save session for future use
The choice of font significantly impacts Unicode rendering quality. Recommended fonts include:
- DejaVu Sans Mono (best overall Unicode coverage)
- Consolas (good Windows compatibility)
- Source Code Pro (excellent readability)
Use this Python test script to verify proper UTF-8 rendering:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
test_chars = [
"✔ Unicode Checkmark",
"☑ Ballot Box",
"★ Star Symbol",
"日本語 Japanese Text",
"Emoji: ???"
]
for item in test_chars:
print(item)
If characters still don't display correctly:
- Verify server locale settings:
echo $LANG
should show UTF-8 - Check remote application encoding settings
- Try different font combinations
- Test with alternate terminal emulators
For developers needing additional control:
- Set
LC_ALL=en_US.UTF-8
in remote shell profile - Configure PuTTY to always force UTF-8 mode
- Use screen/tmux with UTF-8 support
Many developers encounter issues when trying to display UTF-8 characters (including emoji and special symbols) through PuTTY sessions. The problem typically manifests as:
- Boxes or question marks appearing instead of characters
- Incorrect character rendering
- Font-dependent display issues
Here's the step-by-step solution to ensure proper UTF-8 rendering:
1. Launch PuTTY and load your session
2. Navigate to: Window → Appearance
3. Select a Unicode-compatible font (recommended: "DejaVu Sans Mono" or "Consolas")
4. Navigate to: Window → Translation
5. Set "Remote character set" to UTF-8
6. Under "Handling of line drawing characters", select "Use Unicode line drawing code points"
7. In Connection → Data, set "Terminal-type string" to "xterm-256color"
8. Save these settings to your session
Ensure your remote server is properly configured:
# For Linux servers, verify locale settings
locale
# Output should include UTF-8
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
# If not set, configure with:
sudo update-locale LANG=en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8
Use this Python one-liner to test special character rendering:
python3 -c 'print("UTF-8 Test: \u2764\uFE0F \u2600\uFE0F \U0001F60A \U0001F4A1 \u2192")'
Expected output should display: ❤️ ☀️ ? ? →
If issues persist, consider:
- Using Windows Terminal (more modern UTF-8 support)
- Trying MobaXterm as alternative
- Forcing UTF-8 mode in your shell:
# In your .bashrc or .zshrc
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8