[tpm] POD encoding question

Sergio Salvi sergio at salvi.ca
Wed May 21 06:57:30 PDT 2008


Do you have "use utf8;" at the beginning of your file?

On 5/21/08, Madison Kelly <linux at alteeve.com> wrote:
> Hi all,
>
>    I'm having trouble with UTF-8 characters in my module's POD. I've got
>  the entry (truncated for brevity):
>
>  =item new
>
>  =encoding UTF-8
>
>    #-----
>    use TB::Get;
>
>    # Get a handle on the TB::HumanReadable methods.
>    my $hr=TB::Get->new;
>
>    # You can set (...) as a hash reference. Ie:
>    my $hr=TB::Get->new({
>         use_base_2      =>      0,
>         use_24h         =>      0,
>         say_am          =>      "午前",
>         say_pm          =>      "午後",
>         date_seperator  =>      "/",
>         time_seperator  =>      "."
>    });
>     #-----
>
>  This is the constructor method used to access this module's methods.
>
>  =cut
>
>    Now, when I try to read the POD using perldoc, I get:
>
>  -=-=-=-=-=-
>         new
>            #-----
>            use TB::Get;
>
>            # Get a handle on the TB::HumanReadable methods.
>            my $hr=TB::Get->new;
>
>            # You can set (...) as a hash reference. Ie:
>            my $hr=TB::Get->new({
>                  use_base_2      =>      0,
>                  use_24h         =>      0,
>                  say_am          =>      "åå",
>                  say_pm          =>      "åå¾",
>                  date_seperator  =>      "/",
>                  time_seperator  =>      "."
>            });
>  -=-=-=-=-=-
>
>    At the command line, I get:
>
>  $ perldoc TB/Get
>  ./TB/Get.pm:73: Unknown command paragraph "=encoding utf8"
>  <standard input>:222: warning: can't find numbered character 141
>  <standard input>:222: warning: can't find numbered character 141
>  <standard input>:223: warning: can't find numbered character 141
>  <standard input>:223: warning: can't find numbered character 140
>
>    Now, the '=encoding utf8' string is taken directly from the 'perldoc
>  perlpod' documentation...
>
>    Any tips on what I am doing wrong?
>
>  Thanks!
>
>  Madi
>
>  _______________________________________________
>  toronto-pm mailing list
>  toronto-pm at pm.org
>  http://mail.pm.org/mailman/listinfo/toronto-pm
>


More information about the toronto-pm mailing list