MBCONV(1)
MBCONV(1) β the character encoding scheme converter π
okay bestie, gather round, because mbconv is literally the glow-up your messy multi-encoding files have been begging for β¨ it's the manual page for mbconv, and yes it eats encodings for breakfast.
NAME π
mbconv β Character encoding scheme converter
SYNOPSIS π¦
mbconv [options] <file> ...
DESCRIPTION π
So here's the vibe: this is an application of a library that handles multiple octets character encoding:
http://pub.ks-and-ks.ne.jp/prog/libmoe/
and honestly? it was mainly written for debugging of the library. like, it's the library's little test-runner bestie, we love that for it π«Ά
What it does: it reads octet by octet from files given on command line (or standard input if no file is specified), converts character encoding scheme (CES) as specified by command line options (described below), and output to standard output (or a file specified by -t option or -a option). no cap. octet by octet, one at a time, iconically patient π
Options π
-?,-h,--helpβ display summary of options and exits. your lil cheat sheet, use it π-a file,--append-to=fileβ output is appended to file. note: appended, not overwritten, okay? she adds on, she doesn't erase π-c converters,--convert-to=convertersβ specifies character encoding conversion. converters must be comma separated list of words described in "Conversion specifiers". commas, bestie, commas π-f flags,--flag=flagsβ specifies flags to change behavior of conversion. flags must be comma separated list of words describe in "Flag specifiers".-i,--inputβ succeeding options apply to input stream. it's giving "everything after this is about the input" π-m string,--mime-charset=stringβ mime encoding conforming to RFC2047 is performed. <string> is used as charset name.-n,--line-numberβ line number (>= 1) is inserted to beginning of each line. numbered lines, main character energy π₯-o,--outputβ succeeding options apply to output stream.-t file,--to=fileβ output to file (truncated). β οΈ truncated means the old contents are gone, so double-check that path before you commit, fr fr.-w,--widthβ output width of each line.-cs <string>,--charset=stringβ specifies charset name. Some language specifications are also accepted as well as MIME charset names, which are used to restrict candidates of encoding scheme of input stream. Acceptable languages are listed in "Acceptable languages". (yes it's-cswith the letters, not-c, don't get it twisted π)--format=stringβ specifies output format--whichβ output charset name of each input stream tostderr, in the form
file name":" charset name
if two or more files are specifed on the command line, or
charset name
otherwise.
--regex=regular expressionβ specifies regeular expression to filter output. Character encoding of regular expression can be specified by putting string of the form
"*"charset name"*"
at the beginning of the regular expression, otherwise UTF-8. Character encoding of the expression is converted to that of output stream before matching. β¨ encoding-ception, we love to see it β¨
Conversion specifiers π
Conversion is applied just before each character is output to stream. Conversion setup is automatically performed based on CES. So in most cases, yo need not to specify converters explicitly. (she's smart like that, she figures it out herself π )
asciiβ domestic ASCII converted to US-ASCII,cesβ converted appropriately according to the CES bound to input/output stream,to-ucsβ converted to Unicode,f2h,full-to-halfβ Fullwidth compatibility characters are converted to corresponding halfwidth ones,h2f,half-to-fullβ Halfwidth compatibility characters are converted to corresponding fullwidth ones,jisx0213β Codepoints in JIS C 6226 or in JIS X 0208 which are bound to no character are converted into JIS X 0213 plane 1,jisx0213-aggressiveβ All codepoints in JIS C 6226 or in JIS X 0208 are converted into JIS X 0213 plane 1. all of them. aggressive is right there in the name, she's not subtle πms-latin1β Unicode characters of code point between0x80and0x9F(both inclusive) are converted to other Unicode characters as if they are characters of those code point in Microsoft Windows Codepage 1252.ucs-to-jis0208-extra,jis0208-to-ucs-extraβ Converters between some JIS X 0208 and Unicode characters having similar glyphs (by the courtesy of Ambrose Li <acli@ada.dhs.org>). shoutout Ambrose, absolute legend π«Ά
Flag specifiers π§
use-0x28-for-94x94inG0,28β use"1/11 2/4 2/8 F"instead of"1/11 2/4 F"to designate charsets with final octet4/0,4/1, or4/2to G0,ac,ascii-at-controlβ escape sequence"1/11 2/8 4/2"is output before every control character,nossl,ignore-7bit-single-shiftβ escape sequence for 7 bit single shift is ignored,dnc,discard-notprefered-charβ discard characters which CES bound to output stream can not decode. (spellednotpreferedin the flag name, keep it exactly like that, bestie β do not "fix" it π)
Acceptable languages β
The following words may be given instead of MIME charset name for input stream. In that case, encoding scheme is automatically detected (hopefully) among succeeding ones. yes, "hopefully" β she said what she said π
c,cn,china,chineseβx-gb-18030-2000,cn-big5,utf-8, orx-euc-tw.j,ja,jp,japan,japaneseβeuc-jp,shift_jis, orutf-8.k,ko,kr,korea,koreanβeuc-kr,x-johab,utf-8, orx-unified-hangul.cjkβiso-8859-1,x-gb-18030-2000,cn-big5,x-euc-tw,euc-jp,shift_jis,euc-kr,x-johab,x-unified-hangul, orutf-8.
AUTHOR π
Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
DISCLAIMER etc. π
This program is distributed with absolutely no warranty.
Anyone can use, modify, and re-distibute this program without any restriction.
like, absolutely no warranty. zero. none. she said it twice-ish and meant it. but also anyone can use, modify, and re-distibute it without any restriction, so it's giving generous queen π
and that's the whole page, bestie! this one's living its best life as perl v5.28.0, dated 2018-10-04 β vintage but iconic, a true classic, no notes πΈπ¦π
π¦ where this page comes from
- ubuntu jammy: libmoe1.5 1.5.8-5
- ubuntu noble: libmoe1.5 1.5.8-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms