perldoc/POD encoding question

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Wed May 21 14:17:25 UTC 2008


Zbigniew Koziol wrote:
> Hello Madi
> 
> Looks like Chineese? I am not sure but take care of the following:
> 
> 1. use utf8;
> 2. Be sure that your terminal can display characters properly.
> 3. binmode STDIN,":utf8" -- to let perl "know" that perl may receive
> utf8 data in STDIN
> 4. Similar way with STDOUT if needed.
> 
> In general utf8 is very tricky and I had a lot of fun when writing for
> the first time scripts for utf8 in Russian.
> 
> Ah, and take care what your text editor does with encoded text. For me
> just simple gedit worked well enough.
> 
> zb.

Thanks for the reply!

I do use this. I've been trying to standardize all my programs on UTF8 
for a while now, so I got to have "fun" learning about all the 
intricacies of encoding a little while ago, too. :)

Regardless, if it was an internal encoding problem, I don't suspect I'd 
be getting the error:

-=-=-=-=-=-
$ perldoc TB/Get.pm
TB/Get.pm:23: Unknown command paragraph "=encoding utf8"
-=-=-=-=-=-

This looks more like an perldoc problem recognizing the '=encoding' command.

Madi

Here's the start of the file in question:

-=-=-=-=-=-
package TB::Get;

use 5.008;
use Carp;
use Symbol;
use strict;
use warnings;
use locale;
use IO::Handle;
use utf8;

# Setup for UTF-8 mode.
binmode STDOUT, ":utf8:";
$ENV{'PERL_UNICODE'}=1;

BEGIN
{
	our $VERSION="0.3.051";
}

=pod

=encoding utf8

=head1 NAME

TB::Get
...
-=-=-=-=-=-

--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list