in reply to how to read unicode filename

Have a look here

Replies are listed 'Best First'.
Re^2: how to read unicode filename
by Anonymous Monk on Mar 14, 2006 at 10:17 UTC
    dear monks,
    i saw the above link which is useful . but i have trouble in the unpack operation .
    Is it possible to pack the chinese characters like,<\br>
    pack("A4",$chinese);
    the output : ascii junk.
    i tried the above but that is not giving me the appropriate answer. Any one tell why that happening.

      In Windows 7, this outputs a correct utf8 listing.

      open fList, '-|:encoding(UTF-16LE)', 'cmd /U /C dir /W'; open fOut, '>', 'out.txt'; foreach (<fList>) { utf8::encode($_); print fOut $_; }