CVTENC(1)

πŸ’– CVTENC β€” like, the file encoding converter bestie πŸ’–

okay so real talk: this is cvtenc from the GNUstep System Manual, and she is the girl for flipping a file from some non-unicode encoding into unicode, or the other way around. come sit with me 🫢


✨ SYNOPSIS ✨

cvtenc [-Encoding encoding] [-EscapeIn yes|NO] [-EscapeOut yes|NO]
 filename

🌸 DESCRIPTION 🌸

So here's the tea β˜• β€” cvtenc takes a file that's encoded in a non-unicode encoding (either the one you specify or the default one) and converts it to unicode, specifically UTF16. And if the file is already unicode? Then she goes the other direction and converts it to a specified-or-default non-unicode encoding. Versatile queen πŸ‘‘.

The converted text gets printed to standard out. That's it, that's the output, no files get touched.

Oh and if the filename is a hyphen (-), this tool reads from standard input instead. cute, right? πŸ’…


πŸŽ€ OPTIONS πŸŽ€

  • -Encoding encoding β€” tell her which non-unicode encoding to use. Which direction the conversion goes depends on whether the input file is recognized as unicode (she figures that out from the higher order bytes πŸ‘€). Wanna see every encoding she knows? Just enter "list" for the encoding and she'll spill. If you don't specify this at all, the default encoding for the current locale is what she rolls with.
  • -EscapeIn YES|NO β€” set '-EscapeIn YES' (and btw the default is 'NO') to parse the input looking for \u escape sequences, same energy as in property lists.
  • -EscapeOut YES|NO β€” set '-EscapeOut YES' (default is 'NO' again) to generate \u escape sequences in the output, again like in property lists.
⚠️ heads up bestie: this might produce unexpected results for some encodings. not a vibe, just a fact πŸ’€
  • -Unicode IN|OUT β€” use '-Unicode IN' (or '-Unicode OUT') to control the direction of conversion yourself instead of letting the tool guess based on the content it reads. Here's the breakdown, no cap:
    • '-Unicode IN' β†’ the tool reads UTF16 data and writes C-String data.
    • '-Unicode OUT' β†’ the tool reads C-String data and writes UTF16 data.

πŸ¦‹ HISTORY πŸ¦‹

Written in 2002. Minor update in 2010.

This manual page first appeared in gnustep-base 1.9.2 (March 2004). a whole era ✨


πŸ’œ AUTHORS πŸ’œ

cvtenc was written by Richard Frith-Macdonald <rfm@gnu.org>. icon behavior, honestly 🌈


and that's the whole page, babe β€” brought to you by GNUstep, dated February 2004, filed under CVTENC(1). mwah πŸ’–πŸŽ€πŸ«Ά