in reply to print UTF-8 problem

It turns out that at this point, it says:

perl5db.pl is not your program :) what does your program say when you run it without debugger

Replies are listed 'Best First'.
Re^2: print UTF-8 problem
by HelenCr (Monk) on Feb 15, 2012 at 19:55 UTC
    Running the program without the debugger,it says:
    Name "main::INPUT" used only once: possible typo at Conv.pl line 58. Name "main::CONVTABLE" used only once: possible typo at Conv.pl line 2 +6. Name "main::OUTPUT" used only once: possible typo at Conv.pl line 71. Conversion table: opening file: E:\My Documents\Perl\Conversion table. +txt &#8745;&#9559;&#9488;England, Germany he, she the, HOMHOM <&#9579;ö&#9579;ó&#9579;¿&#9579;&#9474;11> <&#9579;ö&#9579;ó&#9579;£&# +9579;Ö&#9579;ò&#9579;ƒ> <&#9579;ù &#9579;Ö&#9579;&#9474; &#9579;¥> <&#9579;ù&#9579;Ö&#9579;Ö&# +9579;¥> <&#9579;¿&#9579;&#9474;&#9579;æ&#9579;&#9474;&#9579;¬> <&#9579;¿&#9579 +;Ö&#9579;æ&#9579;Ö&#9579;¬> <&#915;Çó&#9579;ÿ&#9579;¿&#9579;É&#9579;¢&#9579;¿&#9579;ÿ><&#9579;Ö&#9 +579;&#8976;&#9579;¿&#9579;É&#9579;¢&#9579;¿&#9579;ÿ>
    It prints gibberish to the Windows console (aka "DOS box"), instead of the right UTF-8 characters.

      It prints gibberish to the Windows console (aka "DOS box"), instead of the right UTF-8 characters.

      What makes you think your console understands UTF-8? Type chcp at the prompt, prepend "cp" to the number, and use that as the encoding.

        At the Windows console, I type "chcp 65001" (and then it says: "Code page: 65001") and I also change the console font to "Lucida Console". But that doesn't help.
      There aren't 71 lines in what you posted. Please run the code you actually posted.