Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

LS,

I am trying to build a program that archives files. Basically just playing around. It should read filenames, and compare them to a list I've already archived. Worked pretty well actually, until I hit a file with an ë in the name. Turns out 'ëäöé' is written on terminal as 'Ùõ÷Ú', resulting in the same file getting archived again and again, again.. Of course it reads just fine if you use a win32 progam.

I have rummaged around with localisation and utf8, but I am going nowhere fast and the fun element is fading fast. Could someone give me a recipe to get terminal and file in concurrance, the place where I should be looking in the manuals or preferably both?

Greetings,
Niek.

  • Comment on diacriticals from terminal to file and back on WinXP

Replies are listed 'Best First'.
Re: diacriticals from terminal to file and back on WinXP
by moritz (Cardinal) on Mar 17, 2008 at 14:58 UTC
    You could follow some of the suggestions in this thread. I konw your characters are not Japanese, but it's the same underlying problem.

    I think your best chance on windows is Win32API::File.

Re: diacriticals from terminal to file and back on WinXP
by sgt (Deacon) on Mar 17, 2008 at 20:40 UTC

    humm might be a simple codepage issue. I have a spanish ed. of windows xp. Using a simple iconv wrapper...

    % steph@ape (/home/stephan) % % echo ëäöé ëäöé % steph@ape (/home/stephan) % % echo ëäöé | icv Ùõ÷Ú % steph@ape (/home/stephan) % % echo ëäöé | icv -db .loop: entered debug mode! .loop: [] .icv default-mode .iconv -c -f CP850 -t ISO-8859-1 Ùõ÷Ú
    cheers hth --stephan