LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to copy files having unicodes in filenames in linux from unix (https://www.linuxquestions.org/questions/linux-software-2/how-to-copy-files-having-unicodes-in-filenames-in-linux-from-unix-901785/)

raj k yadav 09-08-2011 03:05 AM

How to copy files having unicodes in filenames in linux from unix
 
Hi,

I have a issue, when I copy files from a nas location where the filenames contains the special characters. For example, capaņ.txt is the file residing on nas but when it is copied on linux server (SLES 10 SP 3), the special character is visible as "?" i.e. capa?.txt.

Below is the output of locale command:

ryadav@itsusra:~> locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Quick help is highly appreciated, please suggest how the special characters can be visible as original.

tredegar 09-08-2011 08:29 AM

The problem is that (some of) the files on your NAS are not UTF-8 encoded.
Linux is using UTF-8 encoding.
You need to convert the file names to UTF-8 encoding.
There's a utility called convmv to help you do this. Then the files can be copied correctly.


All times are GMT -5. The time now is 03:01 PM.