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

Re: chinese characters in windows xp to debian



> On 8/4/06, LI Daobing <lidaobing@gmail.com> wrote:
> > try:
> >
> > 1. sudo apt-get install convmv
> > 2. convmv -f gbk -t utf8 *
> >
> looks like a good app, will do that once this is sorted :)

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!";
    fi;
  done

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.


> For the record, my english surname is in cantonese, but my firstname
> is in mandarin ;) but i'm cantonese from malaysia living in belgium :)
> yes complicated, sorry :P

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



Danai SAE-HAN
韓達耐

-- 
题目:《柳》
作者:寇准(961-1023)

晓带轻烟间杏花,晚凝深翠拂平沙。
长条别有风流处,密映钱塘苏小家。



Reply to: