Subject: | Warn about non-ASCII characters without =encoding statement |
Many POD files on the CPAN are broken because the author use 8-bit
characters, mostly UTF-8 but also Latin1 or other local single-byte
encoding (Windows-1252...).
Those POD files would be ok if they used the "=encoding" statement. But
many authors forget it, as accents shows fine on their platform and
perldoc does not warn.
http://search.cpan.org/~natanael/Devel-CoverReport-0.03/bin/cover_report
Test::Pod doesn't help either because it uses Pod::Simple and P::S
doesn't warn about that problem.
So I suggest Pod::Simple should:
- detect non-ASCII bytes in POD content
- report them if no "=encoding" was specified and suggest either:
* to add a "=encoding" statement (but not all Pod parsers support it)
* to escape character with E<> entities (E<eacute> for 'é'...)
As Test::Pod failures could make installation of many, many, many, many,
many CPAN modules fail (while it is the author fault and not due to the
user environment), I suggest those problems should be reported only in
the following cases to avoid breaking the CPAN:
- $ENV{RELEASE_TESTING} is set
- or $0 !~ /\.t$/
--
Olivier Mengué - http://search.cpan.org/~dolmen/ http://github.com/dolmen/