PICONV(1)

๐Ÿ’… PICONV(1) ๐Ÿ’…

okay so bestie, this is the piconv page from the Perl Programmers Reference Guide and we are gonna make it make sense, fr fr ๐Ÿซถโœจ

๐ŸŒธ NAME ๐ŸŒธ

piconv โ€” iconv(1), reinvented in perl ๐Ÿ’ซ

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

  piconv [-f from_encoding] [-t to_encoding]
         [-p|--perlqq|--htmlcref|--xmlcref] [-C N|-c] [-D] [-S scheme]
         [-s string|file...]
  piconv -l
  piconv -r encoding_alias
  piconv -h

๐Ÿ’– DESCRIPTION ๐Ÿ’–

piconv is the perl version of iconv, a character encoding converter that's widely available for various Unixen today. This script was primarily a technology demonstrator for Perl 5.8.0, but you can use piconv in the place of iconv for virtually any case. No cap. ๐Ÿ”ฅ

piconv converts the character encoding of either STDIN or files specified in the argument and prints out to STDOUT. Slay. ๐Ÿ’…

Here is the list of options. Some options can be in short format (-f) or long (--from) one. Okay bestie, let's go ๐Ÿ˜ค

๐Ÿ“ the options menu ๐Ÿ“

  • -f, --from from_encoding โ€” tells piconv what encoding you're converting from. Unlike iconv, this option can be omitted. If you do omit it, the current locale is used. ๐Ÿซถ
  • -t, --to to_encoding โ€” tells piconv what encoding you're converting to. Unlike iconv, this option can be omitted. If you do omit it, the current locale is used. So when both -f and -t are omitted, piconv just acts like cat. Not me learning that and gasping ๐Ÿ˜ญ
  • -s, --string string โ€” uses string instead of file for the source of text. Cute, direct, no file drama. โœจ
  • -l, --list โ€” lists all available encodings, one per line, in case-insensitive order. Note that only the canonical names are listed; many aliases exist. For example, the names are case-insensitive, and many standard and common aliases work, such as "latin1" for "ISO-8859-1", or "ibm850" instead of "cp850", or "winlatin1" for "cp1252". See Encode::Supported for a full discussion. ๐Ÿ’…
  • -r, --resolve encoding_alias โ€” resolves encoding_alias to the Encode canonical encoding name. Periodt. ๐Ÿ‘‘
  • -C, --check N โ€” checks the validity of the stream if N = 1. When N = -1, something interesting happens when it encounters an invalid character. Yes, that's literally what the page says โ€” I'm not hiding the lore, bestie ๐Ÿ˜ญ
the original really says โ€œsomething interesting happensโ€ for -C -1, and honestly that phrase is doing main character energy all by itself ๐Ÿ’€
  • -c โ€” same as -C 1. Easy. ๐ŸŽ€
  • -p, --perlqq โ€” transliterates characters missing in encoding to \x{HHHH} where HHHH is the hexadecimal Unicode code point. Cute little escape-code moment โœจ
  • --htmlcref โ€” transliterates characters missing in encoding to &#NNN; where NNN is the decimal Unicode code point. HTML girlie behavior. ๐ŸŒธ
  • --xmlcref โ€” transliterates characters missing in encoding to &#xHHHH; where HHHH is the hexadecimal Unicode code point. XML girlie behavior. ๐Ÿฆ‹
  • -h, --help โ€” shows usage. Use it, bestie. ๐Ÿซถ
  • -D, --debug โ€” invokes debugging mode. Primarily for Encode hackers. Like, that's their turf ๐Ÿ‘‘
  • -S, --scheme scheme โ€” selects which scheme is to be used for conversion. Available schemes are as follows:
    • from_to โ€” uses Encode::from_to for conversion. This is the default. โญ
    • decode_encode โ€” input strings are decode()d then encode()d. A straight two-step implementation. ๐Ÿงš
    • perlio โ€” the new perlIO layer is used. NI-S' favorite. You should use this option if you are using UTF-16 and others which linefeed is not $/.

Like the -D option, this is also for Encode hackers. ๐Ÿ”ฅ

๐ŸŒˆ SEE ALSO ๐ŸŒˆ


okay that's the whole page, bestie. This edition is from perl v5.42.3, dated 2026-11-03, and yes it's the PICONV(1) manual page โ€” now go convert some encodings and slay ๐Ÿ’…๐Ÿ’–

๐Ÿ“ฆ where this page comes from