Thread Unicode (ä, ö, ü in German) Problem with File::Fi
(9 answers)
Opened by TeddyC at 2003-09-01 18:11
I 'm new to Perl and not be able to locate my problem exactly. I've searched but can't find the right solution.I hope here is a right place to post.
Env: Win2000(en) +ActivePerl 5.8+ Komodo The trouble begins with special characters in German. I want to copy a whole directory to another location , a prototype got no problem with direct writing paths of source and destination in program: 1) define $srcdir in perl-program $srcdir in perl-program like this: Code: (dl
)
1 use File::Find; Then I wrote srcdir & dstdir in config.xml and use XML:Simple to read and got them in UTF8 format but nothing is copied! 2) define $srcdir in xml $dstdir in xml Komodo shows that first $_ in "finddepth" is "d:\perl\source\test\öa" (ö in Hex) There are someting not correct: it should be "d:\perl\source\test\öa\ü.txt" by depth first search( just like in 1) ) Then I run the Program under Dos, it shows a warning: "Can't cd to <d:\perl\source\test/> öa ..." (here ö can't display correctly") --Is there something wrong in File::Find with utf8 or with utf8 under win2k? --Or it depends on somethings else? I made some tests but I can't understand the results well. 3) define $srcdir in perl-program $dstdir in xml # the files is copied but the charater shows in Ascii format. 4) define $srcdir in perl-program and test Code: (dl
)
1 $srcdir="d:\\perl\\source\\test"; 5).define $srcdir with "ö" in perl-program and use utf8 Code: (dl
)
1 use utf8; --What 's the encoding of a Perl- program in Komodo? --How can I got the encoding's name of a string? --How can I got the right output for "ä, ö ,ü" in DOS? (I got correct character in Komodo with "binmode (STDOUT,"utf8");" ) Thanks for your attention!\n\n <!--EDIT|TeddyC|1062436104--> |