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

Hi,

I've looked on cpan, google and super search. The problem I'm having is when perl 5.8.6 is installed on a linux box with the default character set of utf-8 (unicode), performing pod2usage(-verbose => 2) results in translating the single quote character ' into ā.

Does anyone know how to force pod::usage to print the correct character?

=head1 OPTIONS --version print versions of Modules, Perl, OS, Program info --debug 0 don't print debugging information (default)

Output:

OPTIONS --version print versions of Modules, Perl, OS, Program + info --debug 0 donāt print debugging information (default)

Jason L. Froebe

Team Sybase member

No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

Replies are listed 'Best First'.
Re: pod::usage and unicode
by Cody Pendant (Prior) on May 31, 2006 at 21:39 UTC
    Is that your actual code, the actual character cut and pasted? Because the logical conclusion is that your quote isn't actually a regular ASCII-39-character, it's a "smart quote" from something like Word.

    I find text encodings a bit confusing, but UTF-8 shouldn't have any problems with regular low-numbered ASCII characters.



    ($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
    =~y~b-v~a-z~s; print

      Nope, it is just a plain ascii-39 character and isn't cut& pasted from anything. :(

      Jason L. Froebe

      Team Sybase member

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

Re: pod::usage and unicode
by bpphillips (Friar) on Jun 01, 2006 at 13:55 UTC
    Just a brain-dead sanity check. Is your terminal set up to display UTF-8?

      yup. I narrowed down the issue that it is specifically when I tell pod::usage to display the man page. When I show the 'usage', the single quote is displayed correctly

      Jason L. Froebe

      Team Sybase member

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1