Problem with special characters in SSH

Hello everyone,
I have little problem with Special Characters in SSH. I use Putty to conect my PC to my raspberry Pi 3 with OSMC. My OSMC is configured with the spanish language, included the keyboard and the region.
However, when I connect to my Raspberry and read my files with are named with special characters (like ‘ñ’ or ‘º’) the name of the file does not appear correctly. It shows with the character ‘?’.
Could it be a problem of the “locale”?
How I can fix this?
Thanks in advance.
osmc
osmc1

Try changing the locale with sudo dpkg-reconfigure locales. It’ll be something like es_ES.UTF-8.

Edit. Oops, forgot sudo.

Thanks for your answer. I just tried using the command you mention. Unfortunately it still doesn’t work. I also try to reboot the Raspberry, but the result is the same.
osmc3 osmc4

IIRC, Putty doesn’t always pass through the correct locale.

At the very least, make sure you’re using an up to date version.

Consider trying another client.

Thanks for your answer, @sam_nazarko.
I have just tried in my mobile phone with the app called “RaspController”, I’ve got the same unsatisfactory result. This morning I saw the same problem using the terminal in Ubuntu 20.04 in my other laptop.
Could you recomend any other SSH client for Windows 10 or Android?
Thanks in advance.
Screenshot_2020-10-18-23-33-23-909_it.Ettore.raspcontroller

Which file system does the USB stick use? Are you sure the files are stored with the right characters? Are they shown correctly if you put the stick into your Ubuntu system?

I don’t use PuTTY but a quick search pointed me to this: https://serverfault.com/questions/475925/how-to-fix-putty-showing-garbled-characters

So check your PuTTY settings under Translation and ensure that you have UTF-8 set as the character set.

I use a old 2.5" HDD (recicled from a Toshiba L350 Laptop) conectad to a USB 2.0 box.
It is formated in ext4.
When I read the files with mi Laptop Ubuntu, the name is displayed correctly. Including special characters “ñ” or “í”.

For all the configuration of the system, I followed the next old tutorial:


All freatures works perfectly, except this little detail.

Thanks for answer.

How are you connecting from the Ubuntu system to check the files?

I tested by SSHing into my Vero from my Linux Mint system:

brian@auton /media/Sonic/Music/高 $ ls
'高円寺百景 (Koenjihyakkei)'

I just open a regular terminal and SSH to the Vero.

Well just tried with my Debian SSH client.

osmc@osmc-vero4k:~$ touch ñ.txt
osmc@osmc-vero4k:~$ ls -lah ñ.*
-rw-r--r-- 1 osmc osmc 0 Oct 19 15:14 ñ.txt

Can you try that from your Ubuntu System?

Hello @fzinken I am using my Laptop with Ubuntu 20.04. I tried to created the file like yuo showed me, but it is imposible. It looks like the internal locale did not changed.
By the other part, Now a can confirt that the problem is with Raspberry PI (osmc) and not with the SSH client.

Meybe there is another way to change the locale files.

Thank you for your answer.

ubuntu2

Now I am avaliable to check files using SSH with Ubuntu.
If there is any file that you like I check, let me know.
Thanks for answer.

Try doing as @fzinken suggested and creating the test file in the osmc home directory. That will help show if the problem is with the drives filesystem.

I just SSHed into my Vero from my LM system:

osmc@yeti:~$ touch ñ.txt
osmc@yeti:~$ ls *.txt
ñ.txt

As to what file to check if you have the drive now connected to Ubuntu, check one of the files that wasn’t displaying correctly on the Pi.

and as you can see it works fine. My locale is set to english.

I doubt if there is a problem with the filesystem on the external disk. It’s probably just that the file names were created using a different codepage than utf8. What is the locale on the Ubuntu laptop?