From: Michael Tokarev <mjt@tls.msk.ru>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@gmail.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] Support @documentencoding in scripts/texi2pod.pl
Date: Sun, 11 Mar 2012 13:56:41 +0400 [thread overview]
Message-ID: <4F5C76D9.6090004@msgid.tls.msk.ru> (raw)
In-Reply-To: <1328192202-23450-1-git-send-email-mjt@msgid.tls.msk.ru>
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 <mjt@tls.msk.ru>
> ---
> 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>) {
> /^\@setfilename\s+([^.]+)/ and $fn = $1, next;
> /^\@settitle\s+([^.]+)/ and $tl = postprocess($1), next;
>
> + # Look for document encoding
> + /^\@documentencoding\s+([^.]+)/ and do {
> + $encoding = $1 unless defined $encoding;
> + next;
> + };
> +
> # Identify a man title but keep only the one we are interested in.
> /^\@c\s+man\s+title\s+([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};
>
next prev parent reply other threads:[~2012-03-11 9:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-02 14:16 [Qemu-devel] [PATCH 1/2] Support @documentencoding in scripts/texi2pod.pl Michael Tokarev
2012-03-11 9:56 ` Michael Tokarev [this message]
2012-03-12 8:21 ` Stefan Hajnoczi
2012-03-12 10:14 ` Michael Tokarev
2012-03-12 10:33 ` Stefan Hajnoczi
[not found] <1328192202-23450-1-git-send-email-mjt@tls.msk.ru>
2012-02-02 14:16 ` [Qemu-devel] [PATCH 2/2] Run pod2man with --utf8 option to enable utf8 in manpages Michael Tokarev
2012-02-02 14:32 ` Peter Maydell
2012-02-02 14:46 ` Michael Tokarev
2012-02-02 14:49 ` Peter Maydell
2012-02-02 14:54 ` Michael Tokarev
2012-03-11 9:57 ` Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F5C76D9.6090004@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.