POD and =encoding ...

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

In perlpodspec, I read :

  "=encoding encodingname"

    This command, which should occur early in the document (at least before
    any non-US-ASCII data!), declares that this document is encoded in the
    encoding encodingname, which must be an encoding name that Encoding
    recognizes.  (Encoding's list of supported encodings, in
    Encoding::Supported, is useful here.)  If the Pod parser cannot decode the
    declared encoding, it should emit a warning and may abort parsing the
    document altogether.

and, in Encode::Supported :

     The MIME name as defined in IETF RFCs.  This includes all "iso-"s.

Here, my little test (test-pod-encoding.pod) :
=encoding iso-8859-1

=head1 NAME

test-pod-encoding - some diacritics : ...

=head2 Tests

In paragraph. Some diacritics : ...

   In verbatim. Some diacritics : ...

But, using 'perldoc', I got an error :

% perldoc test-post-encoding.pod
test-post-encoding.pod:1: Unknown command paragraph "=encoding iso-8859-1"
% perldoc -V
Perldoc v3.13, under perl v5.008005 for solaris.

How can I use '=encoding ...' in POD files ?

Paul Gaborit - <http://www.enstimac.fr/~gaborit/
Perl en franais - <http://www.enstimac.fr/Perl/

Site Timeline