summaryrefslogtreecommitdiff
path: root/man/man1/manconv.man1
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2007-09-16 20:25:27 +0100
committerColin Watson <cjwatson@debian.org>2007-09-16 20:25:27 +0100
commite23cad27db0f7667adee2a59b401b7395d813e44 (patch)
tree3a31cf4ea31fcef077b461f4ae8397a4d3e6d08e /man/man1/manconv.man1
parentb4c1a677f3fbffdf895b79f0c15cdcf8340ce441 (diff)
Add more intelligent guessing of manual page encodings. Thanks to
Adam Borowski for discussion leading to this. * src/manconv.c: New program. * man/man1/manconv.man1: Document it. * .bzrignore: Ignore src/manconv. * include/Defines.in (manconv): Add. * man/Makefile.in (manconv, thmanconv, manconv.1): Add. (process_manpage): Add manconv and thmanconv. (allmanpages): Add ./man1/manconv.1. (nlsinstall): Install manconv.1. (nlsuninstall): Uninstall manconv.1. * src/Makefile.in (PRIVTOOLS, all): Add manconv. * po/POTFILES.in: Add src/manconv.c. * po/man-db.pot, po/*.po: Update. * src/man.c (PP_COOKIE): Move to ... * include/manconfig.h.in (PP_COOKIE): ... here. * src/encodings.c (add_manconv): New function to use manconv instead of iconv where appropriate. * src/encodings.h (add_manconv): Add prototype. * src/lexgrog.l (find_name): Use it. * src/man.c (make_roff_command): Use it. Remove coding: preprocessor string handling, as manconv deals with that now. * src/straycats.c (check_for_stray): Use it. * src/Makefile.in (DEFS_encodings.o): Add, defining location of manconv. * docs/NEWS: Document this.
Diffstat (limited to 'man/man1/manconv.man1')
-rw-r--r--man/man1/manconv.man175
1 files changed, 75 insertions, 0 deletions
diff --git a/man/man1/manconv.man1 b/man/man1/manconv.man1
new file mode 100644
index 00000000..85d0b449
--- /dev/null
+++ b/man/man1/manconv.man1
@@ -0,0 +1,75 @@
+.\" Man page for manconv
+.\"
+.\" Copyright (c) 2007 Colin Watson <cjwatson@debian.org>
+.\"
+.\" You may distribute under the terms of the GNU General Public
+.\" License as specified in the file COPYING that comes with the
+.\" man-db distribution.
+.pc
+.TH %thmanconv% 1 "%date%" "%version%" "Manual pager utils"
+.SH NAME
+%manconv% \- convert manual page from one encoding to another
+.SH SYNOPSIS
+.B %manconv%
+.B \-f
+.IR from-code \|[: from-code \|.\|.\|.]
+.B \-t
+.I to-code
+.RB [\| \-d \|]
+.RI [\| filename \|]
+.SH DESCRIPTION
+.B %manconv%
+converts a manual page from one encoding to another, like
+.BR iconv .
+Unlike
+.BR iconv ,
+it can try multiple possible input encodings in sequence.
+This is useful for manual pages installed in directories without an explicit
+encoding declaration, since they may be in UTF\-8 or in a legacy character
+set.
+.PP
+If an encoding declaration is found on the first line of the manual page,
+that declaration overrides any input encodings specified on
+.BR %manconv% 's
+command line.
+Encoding declarations have the following form:
+.PP
+.RS
+.nf
+\&\(aq\e" \-*\- coding: UTF\-8 \-*\-
+.fi
+.RE
+.PP
+or (if manual page preprocessors are also to be declared):
+.PP
+.RS
+.nf
+\&\(aq\e" t \-*\- coding: ISO\-8859\-1 \-*\-
+.fi
+.RE
+.SH OPTIONS
+.TP
+\fB\-f\fP \fIencodings\fP, \fB\-\-from\-code\fP \fIencodings\fP
+Try each of
+.I encodings
+(a colon-separated list) in sequence as the input encoding.
+.TP
+\fB\-t\fP \fIencoding\fP, \fB\-\-to\-code\fP \fIencoding\fP
+Convert the manual page to
+.IR encoding .
+.TP
+.B \-d, \-\-debug
+Produce debugging information.
+.TP
+.B \-h, \-\-help
+Print a help message and exit.
+.TP
+.B \-V, \-\-version
+Display version information.
+.SH "SEE ALSO"
+.IR man (1),
+.IR iconv (1).
+.SH AUTHOR
+.nf
+Colin Watson (cjwatson@debian.org).
+.fi