UNFTRIP(1)

πŸ“¦
version 17.0.0 Β· 2 versions
, in fedora 43

✨ UNFTRIP(1) ✨ β€” the Unftrip Manual bestie edition πŸ’–

okay so. this is unftrip, and it normalizes Unicode text. that's it. that's the whole girl. πŸŽ€


🌸 NAME 🌸

unftrip β€” normalize Unicode text ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

unftrip [--ascii] [--encoding=VAL] [--unicode-version] [OPTION]… [FILE]

πŸ’… DESCRIPTION πŸ’…

So here's the vibe, bestie: unftrip takes Unicode text from stdin and rewrites it to stdout, following whatever Unicode normalization form you picked (it's all in UAX 15, iykyk).

And if you don't specify a normalization form at all? The character stream just gets left intact. Untouched. Zero notes. πŸ’€

Now, the serious part, and I need you to listen: if there are invalid byte sequences in the input, they get reported on stderr and replaced by the Unicode replacement character (U+FFFD) in the output. Not a crash, not a vibe, just a little 🫠 in the output where the bad bytes were.


🌈 NORMALIZATION 🌈

Pick your fighter. Actually pick your form:

  • --nfc β€” Normalization Form C (NFC), which is canonical decomposition followed by canonical composition. decompose then recompose, the glow-up arc πŸ’–
  • --nfd β€” Normalization Form D (NFD), which is just canonical decomposition. fully broken down, no recombination, raw and honest ✨
  • --nfkc β€” Normalization form KC (NFKC), which is compatibility decomposition followed by canonical composition. the compatibility girlies get involved here πŸŽ€
  • --nfkd β€” Normalization form KD (NFKD), which is compatibility decomposition. everything apart, nothing put back together πŸ¦‹

πŸ“ ARGUMENTS πŸ“

  • FILE (absent=-) β€” The input file. Reads from stdin if unspecified. so like, if you don't give her a file, she's just gonna read stdin, periodt πŸ’…

πŸ‘‘ OPTIONS πŸ‘‘

  • -a, --ascii β€” Output the input text as newline (U+000A) separated Unicode scalar values written in the US-ASCII charset. yeah she's gonna spell out every single scalar value for you, one per line 🌈
  • -e VAL, --encoding=VAL β€” Input encoding, must be one of UTF-8, UTF-16, UTF-16LE, UTF-16BE, ASCII or latin1. If unspecified, the encoding is guessed. The output encoding is the same as the input encoding, except for ASCII and latin1, where UTF-8 is output. so those two get a little upgrade, no cap ✨
  • --unicode-version β€” Output supported Unicode version. just tells you which Unicode era she's living in πŸ’–

🫢 COMMON OPTIONS 🫢

  • --help[=FMT] (default=auto) β€” Show this help in format FMT. The value FMT must be one of auto, pager, groff or plain. With auto, the format is pager or plain whenever the TERM env var is dumb or undefined. she's literally reading your environment to decide how to be perceived 😭
  • --version β€” Show version information. the classic. the iconique πŸ‘‘

πŸ”₯ EXIT STATUS πŸ”₯

unftrip exits with one of the following values:

  • 0 β€” no error occurred
  • 1 β€” a command line parsing error occurred
  • 2 β€” the input text was malformed
  • 0 β€” on success.
  • 123 β€” on indiscriminate errors reported on standard error.
  • 124 β€” on command line parsing errors.
  • 125 β€” on unexpected internal errors (bugs).
bestie yes, 0 really is in there twice. I'm not messing with you and I'm not "fixing" it. that's what the page says. both of them. we respect the source πŸ’–

😭 BUGS 😭

This program is distributed with the Uunf OCaml library. See http://erratique.ch/software/uunf for contact information. so if you wanna slide into their DMs about a bug, that's the link 🌸


and that's the whole page, bestie!! you understood all of it, I know you did. this was Unftrip v17.0.0, from the Unftrip Manual, and it's giving absolute legend behaviour πŸ’…βœ¨πŸ¦‹πŸ’– periodt πŸŽ€

πŸ“¦ where this page comes from