LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unrecognized characters in folder names in folders created via Putty (https://www.linuxquestions.org/questions/linux-newbie-8/unrecognized-characters-in-folder-names-in-folders-created-via-putty-4175448866/)

jmjimenezt 02-06-2013 07:18 AM

Unrecognized characters in folder names in folders created via Putty
 
Hi there!

I don't know whether this is the correct place for this post... Anyway:

I'm facing a problem that is driving me crazy:

Imagine that I have a Linux server and there are several clients that use Putty (from a Windows machine) to connect with the Linux server and create directories (could be files as well) with "mkdir".

The problem is that, with Putty, you can use any encoding (CP1250..., ISO-'s, etc) and if you introduce "non-standard" characters like ö, ä, ü (for German for example), later, using the terminal inside the Linux server (UTF-8), I cannot browse into those folder, since these characters are not well recognized.

(I was able to reproduce this problem using a Linux VM in a Windows environment and using Putty with different encodings to connect it.)

Any ideas of what can I do? Any clue?

I created a Python script to try to recognize the encoding what it is not accurate 100%. I know I can use convmv to change the encoding of the folder name but I need to know first which encoding was used.

Thanks in advance!

pan64 02-06-2013 07:38 AM

http://www.samba.org/samba/docs/man/...O/unicode.html
probably you can try something like this:
dos charset = <I do not know>
unix charset = ascii
But i'm not really sure. Also you can use a cronjob or process to rename files, but in that case users will report missing/lost files.

shivaa 02-06-2013 08:15 AM

Is locale setting same for both your Windows system and Linux server?

Can you once try to open any of those directories in this way:-
Just type first 1 or 2 or 3 characters of a directory name and hit tab key from the keyboard. Linux shell will then automatically insert bachslashes (\) before any special characters in dir. name.
Code:

~$ cd sam[tab]
~$ pwd
sample

Second, if any file/dir. name has some special or unrecognized characters, then you can put the file/dir. name in double-quotes like:
Code:

~$ cd "s@mple file"
Although this is just based on my experience, but you can try it. If it don't help, then share some file/name as it's showing in Linux.


All times are GMT -5. The time now is 03:39 AM.