Preserving UTF-8 filenames from Windows to Linux
On occasion I access (Ubuntu) Linux servers from Windows using Putty and WinSCP. In order to preserve UTF-8 filenames, some snakeoil is required.
Putty (v0.60):
- Set Window -> Translation -> Received data assumed to be in which character set = ‘UTF-8′
- Set the LANG environment variable, either by setting it in /etc/environment or /etc/default/locale (system-wide), or within the Putty configuration by adding an environment variable ‘LANG’ with value ‘en_GB.UTF-8′ (or whatever your locale is) within Connection -> Data.
WinSCP (v4.1.0):
- In WinSCP Login dialog, tick ‘Advanced options’
- Set Session -> File protocol = ‘SFTP’
- Set Environment -> UTF-8 encoding for filenames = ‘On’