Perl - system Chinese filename -
can explain why file name display wrong , how fix it? want filename 游戏美术.txt3
i'm using debian 6, perl v5.10.1 lang=en_us.utf-8 language= 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=
#!/usr/bin/perl system("echo 游戏美术 > 游戏美术.txt3"); system ("cat 游戏美术.txt3");
output: cat: 游戏美术.txt3: no such file or directory
i try remove txt3 file: rm -r *.txt3 rm: remove regular file `游\346\217美术.txt3'?
filename displayed 游??美术.txt3 in console. can cat it, content display correctly not filename.
thanks lot.
update 1: have tested 2 codes above on debian 7, perl v5.14.2 , ubuntu 12.04 perl v5.14.2. work fine.
update 2: debian 6, perl v5.10.1
#!/usr/bin/perl system ("touch 游戏美术.txt4");
it can create file 游戏美术.txt4 correctly. meant filename in chinese.
what can "system("echo 游戏美术 > 游戏美术.txt3");" create correct filename? not 游??美术.txt3
thanks!
Comments
Post a Comment