Skip Menu |
 

This queue is for tickets about the podlators CPAN distribution.

Report information
The Basics
Id: 56915
Status: rejected
Priority: 0/
Queue: podlators

People
Owner: Nobody in particular
Requestors: explorer [...] joaquinferrero.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.3.1
Fixed in: (no value)



Subject: Changes to Pod::Man with control named *roff characters
Download (untitled) / with headers
text/plain 3.3k
I patched Man.pm v2.23 for to correct the output to nroff v1.18.1 with utf8 activated. Problem: A .pod with "=encoding ut8" line, pod2man convert utf8 accented characters ("á") into iso-8859-1 chars ("á"), and after this, into nroff accented chars ("a\\*'"), but nroff v1.8.1 clear the accents, and only show "a". nroff recommend to use named control chars. Not need to patch ToMan.pm with the '--utf8' switch to pod2man, because groff v1.18.1 don't have utf8 support. <http://rt.cpan.org/Public/Bug/Display.html?id=39000> Also, I moved the conversion of %ESCAPE chars below the escape literal quotes process. 362a363,368 Show quoted text
> # Normally we do character translation, but we won't even do that in > # <Data> blocks or if UTF-8 output is desired. > if ($convert && !$$self{utf8} && ASCII) { > $text =~ s/([^\x00-\x7F])/$ESCAPES{ord ($1)} || "X"/eg; > } >
370,375d375 < # Normally we do character translation, but we won't even do that in < # <Data> blocks or if UTF-8 output is desired. < if ($convert && !$$self{utf8} && ASCII) { < $text =~ s/([^\x00-\x7F])/$ESCAPES{ord ($1)} || "X"/eg; < } < 1310,1311c1310,1311 < "\\ ", "\\[r!]", "\\[ct]", "\\[Po]", "\\[Cs]", "\\[Ye]", "\\[bb]", "\\[sc]", # 0xA0 < "\\[ad]", "\\[co]", "\\[Of]", "\\[Fo]", "\\[no]", "\\%", "\\[rg]", "\\[a-]", --- Show quoted text
> "\\ ", undef, undef, undef, undef, undef, undef, undef, > undef, undef, undef, undef, undef, "\\%", undef, undef,
1313,1314c1313,1314 < "\\[de]", "\\[+-]", "\\[S2]", "\\[S3]", "\\[aa]", "\\[mc]", "\\[ps]", "\\[bu]", # 0xB0 < "\\[ac]", "\\[S1]", "\\[Om]", "\\[Fc]", "\\[14]", "\\[12]", "\\[34]", "\\[r?]", --- Show quoted text
> undef, undef, undef, undef, undef, undef, undef, undef, > undef, undef, undef, undef, undef, undef, undef, undef,
1316,1317c1316,1317 < "\\[`A]", "\\['A]", "\\[^A]", "\\[~A]", "\\[:A]", "\\[oA]", "\\[AE]", "\\[,C]", # 0xC0 < "\\[`E]", "\\['E]", "\\[^E]", "\\[:E]", "\\[`I]", "\\['I]", "\\[^I]", "\\[:I]", --- Show quoted text
> "A\\*`", "A\\*'", "A\\*^", "A\\*~", "A\\*:", "A\\*o", "\\*(AE",
"C\\*,", Show quoted text
> "E\\*`", "E\\*'", "E\\*^", "E\\*:", "I\\*`", "I\\*'", "I\\*^",
"I\\*:", 1319,1320c1319,1320 < "\\[-D]", "\\[~N]", "\\[`O]", "\\['O]", "\\[^O]", "\\[~O]", "\\[:O]", "\\[mu]", # 0xD0 < "\\[/O]", "\\[`U]", "\\['U]", "\\[^U]", "\\[:U]", "\\['Y]", "\\[TP]", "\\[ss]", --- Show quoted text
> "\\*(D-", "N\\*~", "O\\*`", "O\\*'", "O\\*^", "O\\*~", "O\\*:",
undef, Show quoted text
> "O\\*/", "U\\*`", "U\\*'", "U\\*^", "U\\*:", "Y\\*'", "\\*(Th",
"\\*8", 1322,1323c1322,1323 < "\\[`a]", "\\['a]", "\\[^a]", "\\[~a]", "\\[:a]", "\\[oa]", "\\[ae]", "\\[,c]", # 0xE0 < "\\[`e]", "\\['e]", "\\[^e]", "\\[:e]", "\\[`i]", "\\['i]", "\\[^i]", "\\[:i]", --- Show quoted text
> "a\\*`", "a\\*'", "a\\*^", "a\\*~", "a\\*:", "a\\*o", "\\*(ae",
"c\\*,", Show quoted text
> "e\\*`", "e\\*'", "e\\*^", "e\\*:", "i\\*`", "i\\*'", "i\\*^",
"i\\*:", 1325,1326c1325,1326 < "\\[Sd]", "\\[~n]", "\\[`o]", "\\['o]", "\\[^o]", "\\[~o]", "\\[:o]", "\\[di]", # 0xF0 < "\\[/o]", "\\[`u]", "\\['u]", "\\[^u]", "\\[:u]", "\\['y]", "\\[Tp]", "\\[:y]", --- Show quoted text
> "\\*(d-", "n\\*~", "o\\*`", "o\\*'", "o\\*^", "o\\*~", "o\\*:",
undef, Show quoted text
> "o\\*/" , "u\\*`", "u\\*'", "u\\*^", "u\\*:", "y\\*'", "\\*(th",
"y\\*:", Now, nroff show correct utf8 accented chars. Perl v5.10.0 Linux OpenSuSE v11.2 x86_64 GNU nroff (groff) version 1.18.1 LANG="es_ES.UTF-8" LESS="-M -I -R"
Subject: Re: [rt.cpan.org #56915] Changes to Pod::Man with control named *roff characters
Date: Sun, 25 Apr 2010 09:29:16 -0700
To: bug-podlators [...] rt.cpan.org
From: Russ Allbery <rra [...] stanford.edu>
Download (untitled) / with headers
text/plain 1.2k
"http://www.joaquinferrero.com/ via RT" <bug-podlators@rt.cpan.org> writes: Show quoted text
> I patched Man.pm v2.23 for to correct the output to nroff v1.18.1 with > utf8 activated.
Show quoted text
> Problem: > A .pod with "=encoding ut8" line, pod2man convert utf8 accented > characters ("á") into iso-8859-1 chars ("á"), and after this, into nroff > accented chars ("a\\*'"), but nroff v1.8.1 clear the accents, and only > show "a".
I'm afraid that I cannot apply this patch. The escapes that you use are specific to groff, and the purpose of Pod::Man is to produce portable *roff pages. If I applied this patch, the resulting man pages would only work on Linux systems and would be unreadable on Solaris and other variations of UNIX. The results of pod2man are often distributed as-is and used on other systems, not regenerated for each local version of nroff, so they have to be conservative. If you can guarantee a fully functional nroff for all of the places where the man pages will be read, the right way to do that is to use --utf8, which preserves UTF-8 characters in the output and will work with any nroff implementation that understands UTF-8, not just groff. -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.