{
    "mode": "man",
    "parameter": "PICONV",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/PICONV/1/json",
    "generated": "2026-06-07T16:10:19Z",
    "synopsis": "piconv [-f fromencoding] [-t toencoding]\n[-p|--perlqq|--htmlcref|--xmlcref] [-C N|-c] [-D] [-S scheme]\n[-s string|file...]\npiconv -l\npiconv -r encodingalias\npiconv -h",
    "sections": {
        "NAME": {
            "content": "piconv -- iconv(1), reinvented in perl\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "piconv [-f fromencoding] [-t toencoding]\n[-p|--perlqq|--htmlcref|--xmlcref] [-C N|-c] [-D] [-S scheme]\n[-s string|file...]\npiconv -l\npiconv -r encodingalias\npiconv -h\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "piconv is perl version of iconv, a character encoding converter widely available for various\nUnixen today.  This script was primarily a technology demonstrator for Perl 5.8.0, but you\ncan use piconv in the place of iconv for virtually any case.\n\npiconv converts the character encoding of either STDIN or files specified in the argument and\nprints out to STDOUT.\n\nHere is the list of options.  Some options can be in short format (-f) or long (--from) one.\n\n-f,--from fromencoding\nSpecifies the encoding you are converting from.  Unlike iconv, this option can be\nomitted.  In such cases, the current locale is used.\n\n-t,--to toencoding\nSpecifies the encoding you are converting to.  Unlike iconv, this option can be omitted.\nIn such cases, the current locale is used.\n\nTherefore, when both -f and -t are omitted, piconv just acts like cat.\n\n-s,--string string\nuses string instead of file for the source of text.\n",
            "subsections": [
                {
                    "name": "-l,--list",
                    "content": "Lists all available encodings, one per line, in case-insensitive order.  Note that only\nthe canonical names are listed; many aliases exist.  For example, the names are case-\ninsensitive, and many standard and common aliases work, such as \"latin1\" for\n\"ISO-8859-1\", or \"ibm850\" instead of \"cp850\", or \"winlatin1\" for \"cp1252\".  See\nEncode::Supported for a full discussion.\n\n-r,--resolve encodingalias\nResolve encodingalias to Encode canonical encoding name.\n\n-C,--check N\nCheck the validity of the stream if N = 1.  When N = -1, something interesting happens\nwhen it encounters an invalid character.\n\n-c  Same as \"-C 1\".\n"
                },
                {
                    "name": "-p,--perlqq",
                    "content": "Transliterate characters missing in encoding to \\x{HHHH} where HHHH is the hexadecimal\nUnicode code point.\n"
                },
                {
                    "name": "--htmlcref",
                    "content": "Transliterate characters missing in encoding to &#NNN; where NNN is the decimal Unicode\ncode point.\n",
                    "long": "--htmlcref"
                },
                {
                    "name": "--xmlcref",
                    "content": "Transliterate characters missing in encoding to &#xHHHH; where HHHH is the hexadecimal\nUnicode code point.\n",
                    "long": "--xmlcref"
                },
                {
                    "name": "-h,--help",
                    "content": "Show usage.\n"
                },
                {
                    "name": "-D,--debug",
                    "content": "Invokes debugging mode.  Primarily for Encode hackers.\n\n-S,--scheme scheme\nSelects which scheme is to be used for conversion.  Available schemes are as follows:\n\nfromto\nUses Encode::fromto for conversion.  This is the default.\n\ndecodeencode\nInput strings are decode()d then encode()d.  A straight two-step implementation.\n\nperlio\nThe new perlIO layer is used.  NI-S' favorite.\n\nYou should use this option if you are using UTF-16 and others which linefeed is not\n$/.\n\nLike the -D option, this is also for Encode hackers.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "iconv(1) locale(3) Encode Encode::Supported Encode::Alias PerlIO\n\n\n\nperl v5.34.0                                 2025-07-25                                    PICONV(1)",
            "subsections": []
        }
    },
    "summary": "piconv -- iconv(1), reinvented in perl",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "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 encodingalias Resolve encodingalias to Encode canonical encoding name. -C,--check N Check the validity of the stream if N = 1. When N = -1, something interesting happens when it encounters an invalid character. -c Same as \"-C 1\"."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Transliterate characters missing in encoding to \\x{HHHH} where HHHH is the hexadecimal Unicode code point."
        },
        {
            "flag": "",
            "long": "--htmlcref",
            "arg": null,
            "description": "Transliterate characters missing in encoding to &#NNN; where NNN is the decimal Unicode code point."
        },
        {
            "flag": "",
            "long": "--xmlcref",
            "arg": null,
            "description": "Transliterate characters missing in encoding to &#xHHHH; where HHHH is the hexadecimal Unicode code point."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Show usage."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Invokes debugging mode. Primarily for Encode hackers. -S,--scheme scheme Selects which scheme is to be used for conversion. Available schemes are as follows: fromto Uses Encode::fromto for conversion. This is the default. decodeencode 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."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "iconv",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/iconv/1/json"
        },
        {
            "name": "locale",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/locale/3/json"
        }
    ]
}