found 500210 5.10.0-15
thanks

On Fri, Sep 26, 2008 at 02:04:55PM +0300, Niko Tyni wrote:
> On Thu, Sep 25, 2008 at 11:37:21PM +0200, Gerfried Fuchs wrote:
> > Package: perl-doc
> > Version: 5.10.0-14
> > Severity: normal
> 
> >  When running perldoc perlrun I have strange characters in the output of
> > it, and I managed to pin it down to a short POD snippet like this:
> 
> > =head1 SYNOPSIS
> > 
> > B<perl> S<[ B<-sTtUWX> ]>
> 
> Thanks for noticing this. It's fixed in podlators-2.1.3:
> 
>     * lib/Pod/Man.pm (format_text): Stop remapping the code point for
>     non-breaking space.  This should not be necessary and was wrong
>     when the string from Pod::Simple was a character string and not a
>     byte string.  It was papering over a bug in setting the encoding
>     of an input POD file.
> 
> Patch from upstream git attached.  I'd certainly like to fix this for
> Lenny, we'll see what the release team thinks.

> diff --git a/lib/Pod/Man.pm b/lib/Pod/Man.pm
> index 38c4e3d..203ef4a 100644
> --- a/lib/Pod/Man.pm
> +++ b/lib/Pod/Man.pm
> @@ -362,13 +362,6 @@ sub format_text {
>          $text =~ s/([^\x00-\x7F])/$ESCAPES{ord ($1)} || "X"/eg;
>      }
>  
> -    # For Unicode output, unconditionally remap ISO 8859-1 non-breaking 
> spaces
> -    # to the correct code point.  This is really a bug in Pod::Simple to be
> -    # embedding ISO 8859-1 characters in the output stream that we see.
> -    if ($$self{utf8} && ASCII) {
> -        $text =~ s/\xA0/\xC2\xA0/g;
> -    }
> -
>      # Ensure that *roff doesn't convert literal quotes to UTF-8 single 
> quotes,
>      # but don't mess up our accept escapes.
>      if ($literal) {

For me, this fixed the case where a 0xA0 byte is embedded essentially
accidentally in the middle of a UTF-8 stream (as happened with debconf's
Russian translations), but it broke the case where 0xA0 is actually
being used as a non-breaking space. Note that I'm using the new 'pod2man
--utf8' option, although presumably so is Gerfried since perldoc now
uses that option automatically.

I've attached debconf.fr.1.pod, which reproduces this problem. Run
'pod2man -c Debconf -r '' --utf8 --section=1 debconf.fr.1.pod', and look
carefully at the line matching "purge". It looks like this:

  soient bons et pour que les commandes «?purge?» et «?unregister?» soient

The two characters marked as "?" here are the byte 0xA0. The characters
around it are encoded in UTF-8. 0xA0 doesn't decode as UTF-8 so man
assumes that this page must be ISO-8859-1, which means the whole page
comes out misencoded.

Is this because Pod::Man hasn't been told about the encoding of the
input data, perhaps? The input files pretty much have to be in UTF-8 if
you're using --utf8, so do we have to tell perl that with binmode?

I think I've got about as far as I can with this, so CCing Russ for
help. :-)

-- 
Colin Watson                                       [EMAIL PROTECTED]
        *****************************************************
        *           GENERATED FILE, DO NOT EDIT             * 
        * THIS IS NO SOURCE FILE, BUT RESULT OF COMPILATION *
        *****************************************************

This file was generated by po4a(7). Do not store it (in cvs, for example),
but store the po file used as source file by po4a-translate. 

In fact, consider this as a binary, and the po file as a regular .c file:
If the po get lost, keeping this translation up-to-date will be harder.

=head1 NOM

debconf - Exécuter un programme utilisant debconf

=head1 SYNOPSIS

 debconf [options] commande [args]

=head1 DESCRIPTION

Debconf est un système de configuration pour les paquets Debian. Pour faire
un tour d'horizon de debconf et pour obtenir de la documentation pour les
administrateurs système, veuillez consulter L<debconf(7)>.

Le programme B<debconf> exécute un programme sous contrôle de debconf, en le
configurant pour communiquer avec debconf sur l'entrée et la sortie
standard. La sortie du programme sera l'une des commandes du protocole
debconf, et les codes résultants seront lus sur l'entrée standard. Pour plus
de détails sur le protocole de debconf, veuillez consulter
L<debconf-devel(7)>.

La commande à exécuter depuis debconf doit être spécifiée de manière à ce
qu'elle soit trouvée dans votre PATH.

Cette commande ne reflète pas l'utilisation habituelle de debconf. Il est
courant pour debconf d'être appellé via L<dpkg-preconfigure(8)> ou
L<dpkg-reconfigure(8)>.

=head1 OPTIONS

=over 4

=item B<-o>I<paquet>, B<--owner=>I<paquet>

Indique à debconf à quel paquet appartient la commande exécutée. C'est
nécessaire pour que les droits de propriété des questions enregistrées
soient bons et pour que les commandes S<« purge »> et S<« unregister »> soient
gérées correctement.

=item B<-f>I<type>, B<--frontend=>I<type>

Sélectionner l'interface à utiliser.

=item B<-p>I<valeur>, B<--priority=>I<valeur>

Spécifier la priorité minimale des questions qui vont être posées.

=back

=head1 EXEMPLES

Pour déboguer un script shell qui utilise debconf, vous devriez S<utiliser :>

 DEBCONF_DEBUG=developer debconf mon-script-shell

Ou S<ceci :>

 debconf --frontend=readline sh -x mon-script-shell

=head1 VOIR AUSSI

L<debconf-devel(7)>, L<debconf(7)>

=head1 AUTEUR

Joey Hess <[EMAIL PROTECTED]>

=head1 TRADUCTION

Julien Louis <[EMAIL PROTECTED]>, 2005

Cyril Brulebois <[EMAIL PROTECTED]>, 2006

Reply via email to