.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "MBCONV 1" .TH MBCONV 1 "2019-08-08" "perl v5.28.1" " " .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" mbconv \- Character encoding scheme converter .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& mbconv [options] ... .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is an application of a library to handle multiple octets character encoding: .PP .Vb 1 \& http://pub.ks\-and\-ks.ne.jp/prog/libmoe/ .Ve .PP mainly written for debugging of the library. .PP It reads octet by octet from files given on command line (or standard input if no file is specified), converts character encoding scheme (\s-1CES\s0) as specified by command line options (described below), and output to standard output (or a file specified by \fB\-t\fR option or \fB\-a\fR option). .SS "Options" .IX Subsection "Options" .IP "\fB\-?\fR, \fB\-h\fR, \fB\-\-help\fR" 4 .IX Item "-?, -h, --help" display summary of options and exits. .IP "\fB\-a\fR \fIfile\fR, \fB\-\-append\-to\fR=\fIfile\fR" 4 .IX Item "-a file, --append-to=file" output is appended to \fIfile\fR. .IP "\fB\-c\fR \fIconverters\fR, \fB\-\-convert\-to\fR=\fIconverters\fR" 4 .IX Item "-c converters, --convert-to=converters" specifies character encoding conversion. \&\fIconverters\fR must be comma separated list of words described in \*(L"Conversion specifiers\*(R". .IP "\fB\-f\fR \fIflags\fR, \fB\-\-flag\fR=\fIflags\fR" 4 .IX Item "-f flags, --flag=flags" specifies flags to change behavior of conversion. \&\fIflags\fR must be comma separated list of words describe in \*(L"Flag specifiers\*(R". .IP "\fB\-i\fR, \fB\-\-input\fR" 4 .IX Item "-i, --input" succeeding options apply to input stream. .IP "\fB\-m\fR \fIstring\fR, \fB\-\-mime\-charset\fR=\fIstring\fR" 4 .IX Item "-m string, --mime-charset=string" mime encoding conforming to \s-1RFC2047\s0 is performed. is used as charset name. .IP "\fB\-n\fR, \fB\-\-line\-number\fR" 4 .IX Item "-n, --line-number" line number (>= 1) is inserted to beginning of each line. .IP "\fB\-o\fR, \fB\-\-output\fR" 4 .IX Item "-o, --output" succeeding options apply to output stream. .IP "\fB\-t\fR \fIfile\fR, \fB\-\-to\fR=\fIfile\fR" 4 .IX Item "-t file, --to=file" output to file (truncated). .IP "\fB\-w\fR, \fB\-\-width\fR" 4 .IX Item "-w, --width" output width of each line. .IP "\fB\-cs\fR , \fB\-\-charset\fR=\fIstring\fR" 4 .IX Item "-cs , --charset=string" specifies charset name. Some language specifications are also accepted as well as \s-1MIME\s0 charset names, which are used to restrict candidates of encoding scheme of input stream. Acceptable languages are listed in \*(L"Acceptable languages\*(R". .IP "\fB\-\-format\fR=\fIstring\fR" 4 .IX Item "--format=string" specifies output format .IP "\fB\-\-which\fR" 4 .IX Item "--which" output charset name of each input stream to stderr, in the form .Sp \&\fIfile name\fR\f(CW\*(C`:\*(C'\fR \fIcharset name\fR .Sp if two or more files are specifed on the command line, or .Sp \&\fIcharset name\fR .Sp otherwise. .IP "\fB\-\-regex\fR=\fIregular expression\fR" 4 .IX Item "--regex=regular expression" specifies regeular expression to filter output. Character encoding of \fIregular expression\fR can be specified by putting string of the form .Sp \&\f(CW\*(C`*\*(C'\fR\fIcharset name\fR\f(CW\*(C`*\*(C'\fR .Sp at the beginning of the regular expression, otherwise \fB\s-1UTF\-8\s0\fR. Character encoding of the expression is converted to that of output stream before matching. .SS "Conversion specifiers" .IX Subsection "Conversion specifiers" Conversion is applied just before each character is output to stream. Conversion setup is automatically performed based on \s-1CES.\s0 So in most cases, yo need not to specify converters explicitly. .IP "\fBascii\fR" 4 .IX Item "ascii" domestic \s-1ASCII\s0 converted to US-ASCII, .IP "\fBces\fR" 4 .IX Item "ces" converted appropriately according to the \s-1CES\s0 bound to input/output stream, .IP "\fBto-ucs\fR" 4 .IX Item "to-ucs" converted to Unicode, .IP "\fBf2h\fR, \fBfull-to-half\fR" 4 .IX Item "f2h, full-to-half" Fullwidth compatibility characters are converted to corresponding halfwidth ones, .IP "\fBh2f\fR, \fBhalf-to-full\fR" 4 .IX Item "h2f, half-to-full" Halfwidth compatibility characters are converted to corresponding fullwidth ones, .IP "\fBjisx0213\fR" 4 .IX Item "jisx0213" Codepoints in \s-1JIS C 6226\s0 or in \s-1JIS X 0208\s0 which are bound to no character are converted into \s-1JIS X 0213\s0 plane 1, .IP "\fBjisx0213\-aggressive\fR" 4 .IX Item "jisx0213-aggressive" All codepoints in \s-1JIS C 6226\s0 or in \s-1JIS X 0208\s0 are converted into \s-1JIS X 0213\s0 plane 1, .IP "\fBms\-latin1\fR" 4 .IX Item "ms-latin1" Unicode characters of code point between 0x80 and 0x9F (both inclusive) are converted to other Unicode characters as if they are characters of those code point in Microsoft Windows Codepage 1252. .IP "\fBucs\-to\-jis0208\-extra\fR, \fBjis0208\-to\-ucs\-extra\fR" 4 .IX Item "ucs-to-jis0208-extra, jis0208-to-ucs-extra" Converters between some \s-1JIS X 0208\s0 and Unicode characters having similar glyphs (by the courtesy of Ambrose Li ). .SS "Flag specifiers" .IX Subsection "Flag specifiers" .IP "\fBuse\-0x28\-for\-94x94inG0\fR, \fB28\fR" 4 .IX Item "use-0x28-for-94x94inG0, 28" use \*(L"1/11 2/4 2/8 F\*(R" instead of \*(L"1/11 2/4 F\*(R" to designate charsets with final octet 4/0, 4/1, or 4/2 to G0, .IP "\fBac\fR, \fBascii-at-control\fR" 4 .IX Item "ac, ascii-at-control" escape sequence \*(L"1/11 2/8 4/2\*(R" is output before every control character, .IP "\fBnossl\fR, \fBignore\-7bit\-single\-shift\fR" 4 .IX Item "nossl, ignore-7bit-single-shift" escape sequence for 7 bit single shift is ignored, .IP "\fBdnc\fR, \fBdiscard-notprefered-char\fR" 4 .IX Item "dnc, discard-notprefered-char" discard characters which \s-1CES\s0 bound to output stream can not decode. .SS "Acceptable languages" .IX Subsection "Acceptable languages" The following words may be given instead of \s-1MIME\s0 charset name for input stream. In that case, encoding scheme is automatically detected (hopefully) among succeeding ones. .IP "\fBc\fR, \fBcn\fR, \fBchina\fR, \fBchinese\fR" 4 .IX Item "c, cn, china, chinese" x\-gb\-18030\-2000, cn\-big5, utf\-8, or x\-euc-tw. .IP "\fBj\fR, \fBja\fR, \fBjp\fR, \fBjapan\fR, \fBjapanese\fR" 4 .IX Item "j, ja, jp, japan, japanese" euc-jp, shift_jis, or utf\-8. .IP "\fBk\fR, \fBko\fR, \fBkr\fR, \fBkorea\fR, \fBkorean\fR" 4 .IX Item "k, ko, kr, korea, korean" euc-kr, x\-johab, utf\-8, or x\-unified-hangul. .IP "\fBcjk\fR" 4 .IX Item "cjk" iso\-8859\-1, x\-gb\-18030\-2000, cn\-big5, x\-euc-tw, euc-jp, shift_jis, euc-kr, x\-johab, x\-unified-hangul, or utf\-8. .SH "AUTHOR" .IX Header "AUTHOR" Kiyokazu \s-1SUTO\s0 .SH "DISCLAIMER etc." .IX Header "DISCLAIMER etc." This program is distributed with absolutely no warranty. .PP Anyone can use, modify, and re-distibute this program without any restriction.