qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] Support @documentencoding in scripts/texi2p


From: Michael Tokarev
Subject: Re: [Qemu-devel] [PATCH 1/2] Support @documentencoding in scripts/texi2pod.pl
Date: Sun, 11 Mar 2012 13:56:41 +0400
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20120216 Icedove/8.0

Ping?  It's been more than a month since this patch has been posted.

Maybe it is a good candidate for -trivial queue?

Thanks,

/mjt

On 02.02.2012 18:16, Michael Tokarev wrote:
> Currently our texi2pod ignores @documentencoding even if it is set
> properly in *.texi files.  This results in a mojibake in documents
> generated from qemu.pod (which is generated from qemu-doc.texi by
> texi2pod), because the rest of the tools assumes ASCII encoding.
> 
> This patch recognizes first @documentencoding in input and places
> it at the beginning of output as =encoding directive.
> 
> Signed-Off-By: Michael Tokarev <address@hidden>
> ---
>  scripts/texi2pod.pl |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/scripts/texi2pod.pl b/scripts/texi2pod.pl
> index 9ed056a..94097fb 100755
> --- a/scripts/texi2pod.pl
> +++ b/scripts/texi2pod.pl
> @@ -36,6 +36,7 @@ $fnno = 1;
>  $inf = "";
>  $ibase = "";
>  @ipath = ();
> +$encoding = undef;
>  
>  while ($_ = shift) {
>      if (/^-D(.*)$/) {
> @@ -97,6 +98,12 @@ while(<$inf>) {
>      /address@hidden([^.]+)/ and $fn = $1, next;
>      /address@hidden([^.]+)/ and $tl = postprocess($1), next;
>  
> +    # Look for document encoding
> +    /address@hidden([^.]+)/ and do {
> +        $encoding = $1 unless defined $encoding;
> +        next;
> +    };
> +
>      # Identify a man title but keep only the one we are interested in.
>      /address@hidden([A-Za-z0-9-]+)\s+(.+)/ and do {
>       if (exists $defs{$1}) {
> @@ -336,6 +343,8 @@ $inf = pop @instack;
>  
>  die "No filename or title\n" unless defined $fn && defined $tl;
>  
> +print "=encoding $encoding\n\n" if defined $encoding;
> +
>  $sects{NAME} = "$fn \- $tl\n";
>  $sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
>  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]