0

Apparently, someone didn't pay attention to the encoding when moving files from one server to another and I ended up with filenames containing German umlauts that appear as question mark in ls when using PuTTY. However, when using bash autocomplete, the filename is not displayed with a question mark but with a weird character instead. FileZilla on the other hand displays the characters correctly via SFTP (SSH, not FTP with SSL/TLS) in the file list, but cannot transfer the files:

/var/www/domain.tld/Maße.doc: open for read: no such file or directory

With ls I get:

-rw-r-----   1 smares smares  19K May  9  2013 Ma?e.doc

And when hitting tab to autocomplete:

smares@smares:/var/www/domain.tld$ cat Ma▒e.doc

Is there any way I can rescue the filenames?

Thomas
  • 4,225
  • 5
  • 23
  • 28
  • How is the locale set up in your system and your shell in particular. – Sven Nov 03 '17 at 10:03
  • Ah, thanks for the hint. While I had locales generated for UTF-8 and ISO-8859-1 and also tried with both as LANG, I didn't switch the remote character encoding in PuTTY. With that set to ISO-8859-1 and LANG being set to de_DE.ISO-8859-1, it works. :) –  Nov 03 '17 at 10:27
  • I would try to use utf-8 from now on. That way you can mix languages, and not have to reconfigure terminal. – ctrl-alt-delor Nov 03 '17 at 13:03

1 Answers1

2

I had to switch the remote character set in PuTTY to ISO-8859-1, have locales generated for de_DE.ISO-8859-1 and use that as LANG.