in reply to Re^3: How to display an apostrophe in pod2usage help output.
in thread How to display an apostrophe in pod2usage help output.

Joost, the export worked. The LANG env is set to =en_US.UTF-8.

Now I have got to figure out how I am going to handle this. There are at least 150 different linux boxes at work that I will be using this on.

Most everyone at work is connecting to these boxes via putty.

Do you have any advice on how I should proceed which would ensure that the apostrophes will display correctly on any of these boxes?

Thanks for your help

Best Regards

After all this is over, all that will really have mattered is how we treated each other.
  • Comment on Re^4: How to display an apostrophe in pod2usage help output.

Replies are listed 'Best First'.
Re^5: How to display an apostrophe in pod2usage help output.
by Joost (Canon) on Sep 16, 2007 at 18:22 UTC
      So based on what you have already told me, this seems to work. Is this safe?

      if ( $help ) { $lang = $ENV{'LANG'}; $ENV{'LANG'} = 'C'; pod2usage(-verbose => 2 ); $ENV{'LANG'} = $lang; }
      After all this is over, all that will really have mattered is how we treated each other.
        That will work given your current situation.

        Two problems:

        1. it won't fix any problems with other programs (like man) that look at the locale to determine the encoding.

        2. if someone does set their terminal encoding to utf-8 (or uses another terminal that defaults to utf-8, which the systems local terminals almost certainly do) it will mess up 8-bit "extended ascii" characters (like latin-1, or whatever the system thinks uses by default).

        IOW, you're almost certainly better off in the long run if you configure the terminal(s) to use UTF-8. Unless you're 100% sure you're never going to have to read anything but latin-based characters - or perl 6. Then you could just set the systems' default LANG to C instead of hacking around the problem by ignoring the locale.