KONWERT(1)
๐ KONWERT ๐
okay bestie, gather round, because this is konwert โ section 1 of the Linux User's Manual โ and it is literally the interface for various character encoding conversions. she converts. she slays. let's go ๐ฆ
๐ธ NAME ๐ธ
konwert โ the interface for various character encoding conversions. she's the group chat translator but for bytes, fr fr ๐
โจ SYNOPSIS โจ
konwert FILTER [FILE]... [-o DEST | -O]
๐ DESCRIPTION ๐
okay so konwert lets you filter multiple files through multiple filters, which is giving main character energy. It filters the FILEs you hand it, or if you give it none, she reads from stdin like a good listener ๐ซถ
A simple FILTER is just the name of an executable file, and konwert goes looking in the directory ~/.konwert/filters or the system-wide one, which is normally /usr/share/konwert/filters. That program does its own little thing: filters stdin to stdout. simple. iconic. โจ
But the filtering rule can be way more complex than that, bestie:
konwert FILTER1+FILTER2โ this meanskonwert FILTER1 | konwert FILTER2. piping, but make it fashion ๐ซkonwert FORMAT1-FORMAT2โ unless such a filter already exists, she tries to find a commonFORMAT3, such that both filtersFORMAT1-FORMAT3andFORMAT3-FORMAT1do exist. like finding a mutual friend to relay the message ๐konwert FILTER/ARG/...โ this passes arguments to the filter. You can also specify arguments right here:FORMAT1/ARGS-FORMAT2. What those arguments mean is entirely up to the particular filter โ no cap, it's filter-specific.konwert '(COMMAND ARGS...)'โ this executes an arbitrary shell command. super useful with the-oor-Ooptions btw. The command cannot contain the string)+, because that string terminates this filter's specification. so don't try it ๐
๐ OPTIONS ๐
-o DESTโ output goes to this file/directory instead ofstdout. changing the destination, not the vibe โจ-Oโ every input file is replaced with its translation. in-place glow-up ๐ฅ--helpโ display help and exit. your bestie when you're lost ๐ฅบ--versionโ output version information and exit. who is she ๐
bestie listen to me. Redirecting output to one of the source files with either-oor>instead of-Owill corrupt it! sobbing, screaming, throwing up ๐ญ Option-Ois the safe queen: she creates a temporary file in/tmpand later copies it back onto the source. Use her. ๐ซถ
๐ CHARACTER ENCODING CONVERSIONS ๐
You can convert text between any two charsets, for example konwert cp437-iso2. yes really, just like that ๐ซ
Characters that don't exist in the target charset will be substituted with approximations made from characters that are available. And ngl, those approximations need not be single characters โ they can be whole little strings, she's flexible like that.
The following character sets are currently supported, and yes I'm listing every single one because we don't skip anybody in this house ๐
asciiโ 7bit ASCIIutf8 = unicodeโ Unicode UTF-8iso1 = isolatin1โ ISO-8859-1 aka ISO Latin 1 (Western European)iso2 = isolatin2โ ISO-8859-2 aka ISO Latin 2 (Central European)iso3 = isolatin3โ ISO-8859-3 aka ISO Latin 3 (Esperanto)iso4 = isolatin4โ ISO-8859-4 aka ISO Latin 4 (Baltic)iso5 = isolatincyrโ ISO-8859-5 (Cyrillic)iso6 = isolatinarabicโ ISO-8859-6 (Arabic)iso7 = isolatingreekโ ISO-8859-7 (Greek)iso8 = isolatinhebrewโ ISO-8859-8 (Hebrew)iso9 = isolatin5 = isolatinturโ ISO-8859-9 aka ISO Latin 5 (Turkish)iso10 = isolatin6 = isolatinnordicโ ISO-8859-10 aka ISO Latin 6 (Nordic)iso12 = isolatin7 = isolatincelticโ ISO-8859-12 aka ISO Latin 6 (Celtic) - Draftiso13 = isolatin8 = isolatinbalticโ ISO-8859-13 aka ISO Latin 6 (Baltic) - Draftiso14 = isolatin9 = isolatinsamiโ ISO-8859-14 aka ISO Latin 6 (Sรกmi) - Draftiso15โ ISO-8859-15 - Draftkoi8rโ KOI8-R (Russian)koi8uโ KOI8-U (Ukrainian, Byelorussian)koi8uniโ KOI8-Uni (Cyrillic)cp1250 = wince = winlatin2โ Windows CP-1250 aka Win Latin 2 (Central European)cp1251 = wincyrโ Windows CP-1251 (Cyrillic)cp1252 = winwest = winlatin1โ Windows CP-1252 aka Win Latin 1 (Western European)cp1253 = wingrโ Windows CP-1253 (Greek)cp1254 = winturโ Windows CP-1254 (Turkish)cp1255 = winhebrewโ Windows CP-1255 (Hebrew)cp1256 = winarabicโ Windows CP-1256 (Arabic)cp1257 = winbalticโ Windows CP-1257 (Baltic)cp1258 = winvietโ Windows CP-1258 (Vietnamese)cp437 = icmengโ DOS CP-437 (English)cp737 = dosgreekโ DOS CP-737 (Greek)cp775 = dosbalticโ DOS CP-775 (Baltic)cp850 = doswest = doslatin1โ DOS CP-850 aka DOS Latin 1 (Western European)cp852 = dosce = doslatin2โ DOS CP-852 aka DOS Latin 2 (Central European)cp855 = doscyrโ DOS CP-855 (Cyrillic)cp857 = dosturโ DOS CP-857 (Turkish)cp860 = dosportugalโ DOS CP-860 (Portugal)cp861 = dosicelandโ DOS CP-861 (Icelandic)cp862 = doshebrewโ DOS CP-862 (Hebrew)cp863 = doscanadfrโ DOS CP-863 (Canadian French)cp864 = dosarabicโ DOS CP-864 (Arabic)cp865 = dosnordicโ DOS CP-865 (Nordic)cp866 = dosrussianโ DOS CP-866 (Russian)cp869 = dosgreek2โ DOS CP-869 (Greek2)cp874 = dosthaiโ DOS CP-874 (Thai)macโ Macintosh Roman (Western European)macceโ Macintosh Central Europeanmaccyrโ Macintosh Cyrillicmacgreekโ Macintosh Greekmacicelandโ Macintosh Icelandicmacturโ Macintosh Turkishcsk,cyfromat,dhn,fidomazovia,iea,logic,mazovia,microvexโ DOS charsets for Polishamigapl,fat,xjpโ Amiga charsets for Polishkamenickyโ DOS charset for Czech and Slovakwingreekโ WinGreek (Windows font-based encoding for ancient Greek)babelplโ TeX[polish]{babel}:"a"c"e"l"n"o"s"z"rciachyโ TeX\prefixing:/a/c/e/l/n/o/s/x/zxmetodoโ Esperanto:cx gx hx jx sx ux (vx w)hmetodoโ Esperanto:ch gh hh jh sh uantauxcxapโ Esperanto:^c ^g ^h ^j ^s ^u (~u)postcxapโ Esperanto:c^ g^ h^ j^ s^ u^ (u~)apostrofojโ Esperanto:c' g' h' j' s' u'malapostrofojโ Esperanto:c` g` h` j` s` u`visciiโ VISCII (Vietnamese)viqriโ Vietnamese Quoted Readable Implicithtmldecโ SGML/HTML character references (decimal):Æ ě →htmlhexโ SGML/HTML character references (hexadecimal):Æ ě →htmlentโ SGML/HTML character entities (names):Æ &ecaron →htmlโ All three above (only as input format)texโ TeX with some LaTeX or AMS-TeX extensions. There is no distinction between normal and math mode โ you will probably have to insert some$'s manually. yes, manually, sorry bestie ๐ญmnemonicโ RFC 1345 mnemonics preceded by&mnemonic1โ RFC 1345 mnemonics preceded by`any/LANGUAGE(e.g.any/pl-iso2) โ this special input format will detect the encoding automatically, basing on the frequencies of characters found in text. Every language is associated with a set of possible encodings used for it and average frequencies of its letters (excluding ASCII letters). The best fitting encoding is used for conversion. Currently supported languages arecs(Czech),de(German),el(Greek),eo(Esperanto),es(Spanish),fr(French),he(Hebrew),it(Italian),pl(Polish),pt(Portuguese),ru(Russian), andsv(Swedish). she's reading you, divination era ๐ฎโจvarplโ Mixed Polish ISO-8859-2, CP-1250, and UTF-8. If you are reading Polish newsgroups I suggest putting it as a filter in your newsreader (for speed improvement it's better to call it directly, rather than throughkonwert).vareoโ Mixed various Esperanto encodings.
๐ OPTIONS CONTROLLING THE ABOVE CONVERSIONS ๐
/1(e.g.konwert iso2-ascii/1) โ Each unavailable character will be replaced only with a single approximate char, not string. This is useful with thefiltermprogram or with preformatted text. This option is automatically turned on when a filter is used as output forfilterm. one char only, we're being minimal about it ๐/htmlโ Text is assumed to be HTML. The characters" & < >resulting from other characters' approximations will be properly escaped as" & < >. The<META http-equiv="content-type" content="text/html; charset=...">header will be fixed if present. escaping queen ๐/htmldecโ Convert META as above. Unavailable characters will be encoded in&#Unicode;./htmlhexโ Convert META as above. Unavailable characters will be encoded in hexadecimal&#xUnicode;./texโ Unavailable characters will be described in TeX. Characters# $ % & \ ^ _ { | } ~resulting from some characters' approximations will be properly escaped into\# \$ \% \& $\backslash$ \^{} \_ \{ $|$ \} \~{}./asciicharโ Recognizes some ASCII representations of characters, e.g.(c)...1/2>=./rosyjskiโ Russian text will be replaced with its Polish phonetic transcription. iconic crossover event ๐ฅ
Some output filters can use the language information for choosing better approximations of unavailable letters, for example /de (German): รค โ ae instead of a. language-aware, she's cultured ๐ง
๐ฆ OTHER FILTERS ๐ฆ
any/LANGUAGE-testโ Detects the encoding, but instead of text conversion only shows the encoding's name. The additional option/allshows all possible encodings, sorted from better to worse ones. tarot card reading but for bytes โจcr,lf,crlfโ Force specific end-of-line marker convention.cr= Macintosh,lf= Unix and Amiga,crlf= Windows and DOS. The input convention is detected automatically. she just knows ๐ซถexpandโ Expands tabs into spaces (uses the textutils programexpand).unexpandโ Compresses spaces into tabs (uses the textutils programunexpand).rmspacesateolโ Removes spaces and tabs at end of line. trailing whitespace found DEAD ๐qp-8bit,8bit-qpโ MIME Quoted Printable encoding:=A3=F3d=BC.rtf-8bit,8bit-rtfโ Rich Text Format:\'a3\'f3d\'9f.txt-htmlcharโ Escapes" & < >into SGML/HTML entities" & < >. Useful for including a text file inside HTML<PRE> </PRE>tags.htmlchar-txtโ Reverse. yes queen, go back ๐rot13โGuvf vf n qrzbafgengvba bs ebg13.(iykyk ๐)toupper,tolowerโ Self-explanatory. Currently ASCII only. ngl that "currently" is doing a lot of work.prn7plโ Converts polish chars to control sequences for EPSON-compatible printer. Using only 7-bit chars, backspacing printer's head and vertical positioning chars,.'``it creates pseudo-polish glyphs. You can specify options:/nlq(default) which optimizes output for better quality printers and/draftโ useful for ex. for 9-nails printer. retro printer era, we respect the ancestors ๐จ๏ธโจ
๐ FILES ๐
/usr/share/konwert/filters/*~/.konwert/filters/*
๐ SEE ALSO ๐
๐ BUGS ๐
APPLEcharacter inmac*charsets, andCHandchcharacters inkoi8csare not preserved in conversion even when they are available. Also they don't respect the/1option. Reason: they are not in Unicode. look, she's doing her best, they're simply not in Unicode ๐ญ๐
ยฉ๏ธ COPYRIGHT ยฉ๏ธ
okay so legally we gotta do this part and like, we're doing it with love, but we're doing it properly, because bestie, the details matter. ๐ซถ
Konwert is a package for conversion between various character encodings.
Copyright (c) 1998 Marcin 'Qrczak' Kowalczyk
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. โจ
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
๐ yes it's the classic GPL boilerplate, no we are not skipping it, and yes "version 2 or later, your call" is genuinely what it says. slay.
๐ AUTHOR ๐
the icon, the legend, the person who decided character encodings were going to be a vibe:
__("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.home.ml.org/
\__/ GCS/M d- s+:-- a21 C+++>+++$ UL++>++++$ P+++ L++>++++$ E->++
^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP->+ t
QRCZAK 5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-
that's the signature. that's the whole geek code. we did not edit a single character of it, because it's iconic and it's his. ๐ QRCZAK ๐
and that's the whole page, bestie!! ๐ฆ you made it all the way to the bottom, which is genuinely main character energy. this is Konwert, page KONWERT(1), dated 30 Jul 1998 โ an absolute classic, fr fr. go convert some encodings, you've earned it. ๐
๐ธ
๐ฆ where this page comes from
- debian trixie: konwert 1.8-15 ยท GPL-2.0-or-later
- ubuntu questing: konwert 1.8-15
- ubuntu resolute: konwert 1.8-15build1 ยท GPL-2.0-or-later
- ubuntu stonking: konwert 1.8-15build1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms