POD and =encoding ...

P

Paul Gaborit

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 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top