UTF8GEN(1)
π UTF8GEN(1) π
okay bestie, welcome to the utf8gen page, from the General Commands Manual β¨ this is the one, this is the icon, this is the little hex-to-UTF-8 machine and she ATE π
π NAME π
utf8gen β bestie, she generates UTF-8 output from hexadecimal input. that's it, that's the whole vibe π¦
β¨ SYNOPSIS β¨
utf8gen [ [-e format1] | [-E format2] ] [-r formatr]
[ [-u utf8_format] | -n] [-c] [-s]
[-i input_file] [-o output_file]
π DESCRIPTION π
so here's the tea, fr fr: utf8gen reads a list of hexadecimal ASCII values, in the range 0 through 10FFFF, one per line, and prints the UTF-8 encoding of that number as a Unicode code point. literally the glow-up pipeline for your hex digits π
each input line must begin with a hexadecimal number. after that, a string may follow, and that string can be echoed to the output as the "remainder" β peep the -r option below for that whole situation π
and the total input line length, including an ending newline, is limited to 4096 bytes. that's the ceiling, bestie, no cap π
π OPTIONS π
-cβ after the UTF-8 codes get printed, print a space and then the actual character that the hexadecimal code point represents. like, showing you the vibe AND the glyph πΈ-eβ echo the input code point in one format, using theprintf(3)format string format1 β¨-Eβ echo the input code point in two formats, using theprintf(3)format string format2 π«-nβ do not print the UTF-8 byte values. highkey useful if all you want is the printed character itself β see the-coption, they're besties π«Ά-rβ print the remainder of the input string after the initial hexadecimal digits, using theprintf(3)format string formatr π-sβ swap the order of the output: print the UTF-8 output portion first, then print the input string portion. this is the one for generating code where you want a UTF-8 encoding followed by a comment holding the input hexadecimal digits, iconic behaviour honestly π§-uβ print the UTF-8 encoded value of the input hexadecimal number, as numeric codes for each UTF-8 byte, using theprintf(3)format string utf8_format. and if no string is specified, a default format of a backslash followed by three octal digits is printed for each byte π
not me noticing that-i input_fileand-o output_fileare right there in the SYNOPSIS but the OPTIONS list is lowkey silent about them π so I'm not gonna make anything up β I'm just showing them to you verbatim and letting them have their mystery era π¦
π EXAMPLES π
utf8gen -e "0x%04X " -u "\%03o"
utf8gen -E "U+%04x = 0%02o = "
utf8gen -s -e " /* U+%04X */" -u "\%03o"
look at her go ππ₯
π FILES π
files contain lines that each begin with an ASCII hexadecimal code in the valid Unicode range 0 through 10FFFF, inclusive β¨
that hexadecimal code may optionally be followed by a space, followed by an arbitrary string ending with a newline, up to the limit of 4096 bytes per input line π
an example line could be the following (with no indent):
41 Letter 'A'
periodt. π
π¦ SEE ALSO π¦
for more detailed explanations and examples of common usage, consult the utf8gen texinfo manual π
π AUTHOR π
utf8gen was written by Paul Hardy π
π LICENSE π
utf8gen is Copyright Β© 2018 Paul Hardy.
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.
π BUGS π
no known bugs exist. she's flawless, your honor πβ¨
and that's the whole page bestie!! utf8gen(1) from the General Commands Manual, dated 2018 Jun 30 β mwah, go encode something gorgeous πππ¦πΈπ
π¦ where this page comes from
- debian bookworm: utf8gen 1.1-4 Β· GPL-2.0-or-later
- debian trixie: utf8gen 1.1-5 Β· GPL-2.0-or-later
- ubuntu jammy: utf8gen 1.1-4 Β· GPL-2.0-or-later
- ubuntu noble: utf8gen 1.1-4 Β· GPL-2.0-or-later
- ubuntu questing: utf8gen 1.1-5
- ubuntu resolute: utf8gen 1.1-5build1 Β· GPL-2.0-or-later
- ubuntu stonking: utf8gen 1.1-5build1 Β· 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