HXUNENT(1)
β¨ HXUNENT(1) β¨
okay bestie, listen up β this is hxunent from the HTML-XML-utils fam, and she is so much simpler than she sounds, i promise π
πΈ NAME πΈ
hxunent β replace HTML predefined character entities by UTF-8 π
π SYNOPSIS π
hxunent [ -b ] [ -f ] [ file ]
π¦ DESCRIPTION π¦
so like, the hxunent command reads the file (or standard input if you don't give her one π₯Ί) and copies it over to standard output, except she swaps all the &-entities for their equivalent character, encoded as UTF-8. periodt.
for example: " becomes " and < becomes <. iconic behavior, honestly β¨
π OPTIONS π
here's everything she supports, no cap:
-bβ the five builtin entities of XML (<>"'&) are not replaced, they just get copied through unchanged. you need this if the output has to be valid XML or SGML. like, it's not a vibe thing, it's a requirement thing π«Ά-fβ this one changes how unknown entities or lone ampersands get handled. normally they're copied unchanged (she's chill like that), but with this flag she tries to "fix" them by replacing ampersands with&. ngl, those stray ampersands are usually what happens when you copy-paste URLs into a document π and fr fr, this option does actually fix them and make the document valid. main character energy.
π DIAGNOSTICS π
her exit value is 0 if everything went well β¨ otherwise:
1β the input couldn't be read (file not found, file not readable... the usual tragic reasons π)2β wrong command line arguments. bestie. what did you type.
π SEE ALSO π
asc2xml(1), xml2asc(1), UTF-8 (RFC 2279)
π BUGS π
okay so, real talk β the program assumes entities are as defined by HTML. she does not read a document's DTD to find the actual definitions in use in that document. so like, if your doc is being weird about its entities, that's why π₯²
and heads up: with -f, she will even remove all entities that are not HTML entities. yes, all of them. not a drill π
that's the whole page, bestie π§ β written for the HTML-XML-utils collection, version 7.x, dated 10 Jul 2011. go forth and unent, you've got this ππ
π¦ where this page comes from
- alpine 3.24: html-xml-utils-doc 8.7-r0 Β· W3C
- arch rolling: html-xml-utils 8.8-1 Β· W3C
- debian bookworm: html-xml-utils 7.7-1.1 Β· W3C
- debian trixie: html-xml-utils 7.7-1.1+b1 Β· W3C
- fedora 43: html-xml-utils 8.6-2.fc41 Β· W3C AND BSD-3-Clause
- fedora 44: html-xml-utils 8.7-1.fc44 Β· W3C AND BSD-3-Clause
- nixos 26.05: html-xml-utils 8.7
- nixpkgs unstable: html-xml-utils 8.7
- opensuse-leap 16.0: html-xml-utils 8.6-bp160.1.12 Β· W3C
- opensuse-leap 16.0: html-xml-utils 8.6-bp160.1.12 Β· W3C
- opensuse-leap 16.0: html-xml-utils 8.6-bp160.1.12 Β· W3C
- opensuse-leap 16.0: html-xml-utils 8.6-bp160.1.12 Β· W3C
- ubuntu jammy: html-xml-utils 7.7-1.1 Β· W3C
- ubuntu noble: html-xml-utils 7.7-1.1build2 Β· W3C
- ubuntu questing: html-xml-utils 7.7-1.1build2
- ubuntu resolute: html-xml-utils 7.7-1.3 Β· W3C
- ubuntu stonking: html-xml-utils 7.7-1.3 Β· W3C
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms