El 29/01/13 04:12, Mark Allen via RT escribió:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=80640 >
>
> On Mon Nov 05 12:31:33 2012, explorer@joaquinferrero.com wrote:
>>
>> perldoc -L ES perlfunc
>>
>> works because perldoc reads the '=encoding utf8', but
>>
>> perldoc -L ES -f chr
>>
>> won’t render properly characters with diacritic marks:
>>
>> chr NÃ<U+009A>MERO
>> chr Devuelve el carácter representado por NÃ<U+009A>MERO en
>> el conjunto
>> de caracteres. Por ejemplo, "chr(65)" es "A" tanto en
>> ASCII
>> como en Unicode, y chr(0x263a) es una cara sonriente
>> en Unicode.
>>
>
> I just uploaded 3.19_01 to CPAN. I would really appreciate it if you'd
> test that out and let me know if this is still a problem.
>
> Thanks.
>
Tested:
-----------------------------------------8<-----------------------------------------------
$ perldoc -V
Perldoc v3.19_01, under perl v5.016000 for linux
$ export PERLDOC_POD2=1
$ perldoc -f chmod
chmod LISTA
Cambia los permisos de una lista de archivos. El primer elemento de la lista
debe ser un modo numérico, que normalmente estará en octal, y que,
definitivamente, no debe ser una cadena de d\303gitos en octal: 0644 es correcto,
"0644" no lo es. Devuelve el número de archivos cambiados con éxito. Vea
también "oct" si todo lo que tiene es una cadena.
-----------------------------------------8<-----------------------------------------------
¡Oops! The 'í' char (small i latin with acute diacritic mark) is translated to only 0xc3 byte, the preamble of \xc3 \xad actual utf-8 chars, but the second byte is not emitted (at word "dígitos", line three). All rest of special char are correct.
I tracked two chars into the perldoc process:
0. perlfunc file, chmod description:
é : \xc3 \xa9
í : \xc3 \xad
(all pod is utf-8 encoded)
1. perldoc -f chmod. perldoc find and extract the correct segment of chmod function description and write it to /tmp/ file.
é : \xc3 \xa9
í : \xc3 \xad
(the segment is same content that perlfunc.pod. Only '=over 8' and '=back' are added)
2. perldoc render this file (call to ToTerm.pm) into another file:
é : \xc3 \xa9
í : \xc3
(Oops!, the second byte of í are lost!)
3. perldoc execute the pager
...
This fail, also:
-----------------------------------------8<-----------------------------------------------
Show quoted text> perldoc -o text -d kk2 -f chmod
Perldoc (Pod::Perldoc::ToText) output saved to kk2
-----------------------------------------8<-----------------------------------------------
Then, I edited perlfunc.pod and I wrote all special Spanish char:
-----------------------------------------8<-----------------------------------------------
$ perldoc -f chmod
chmod LISTA
áÁéÉ303ÍóÓúÚüÜñÑçÇ
-----------------------------------------8<-----------------------------------------------
Yes! All work, but not the 'í' :)
JF