[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: chinese characters in windows xp to debian

On 8/5/06, 韓達耐 Danai SAE-HAN <danai.sae-han@skynet.be> wrote:
You might try to run the following shell command in your directory:

$ for filename in *;
    do echo "Renaming $filename into `printf "$filename" | iconv -f GB18030`";
       mv --verbose "$filename" "`printf "$filename" | iconv -f GB18030`";
    if [ $? != 0 ];
       then echo "Renaming has failed.  Boo!";

Change the locale accordingly.  I have never tried convmv, but I
presume it does something like the above.

If you don't know what charset the files use, try the following command:

$ ls directory/ | LANG=zh_CN.gbk less

Change LANG= into every locale you have, and once you see every
character, you know exactly which locale it is.  It could be GB2312,
but if some characters aren't displayed in the terminal, it might also
be GBK or GB18030.

Good good, thank you very much! Will exhaust all these and see what I
can get out of it :)

Hmm, Belgium!  Where, if I may ask?  I'm from Antwerp. =)

Antwerp as well. Surprise surprise. Haha :)

Reply to: