Linux "piconv" Command Line Options and Examples
- iconv

piconv is perl version of iconv, a character encoding converter widely available for various Unixen today. This script was primarily a technology demonstrator for Perl 5.8.


Usage:

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






Command Line Options:

-f
Specifies the encoding you are converting from. Unlike iconv, this option can be omitted. In such cases,the current locale is used.
piconv -f ...
-t
Specifies the encoding you are converting to. Unlike iconv, this option can be omitted. In such cases,the current locale is used.Therefore, when both -f and -t are omitted, piconv just acts like cat.
piconv -t ...
-s
uses string instead of file for the source of text.
piconv -s ...
-l
Lists all available encodings, one per line, in case-insensitive order. Note that only the canonicalnames are listed; many aliases exist. For example, the names are case-insensitive, and many standard andcommon 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.
piconv -l ...
-r
Resolve encoding_alias to Encode canonical encoding name.
piconv -r ...
-C
Check the validity of the stream if N = 1. When N = -1, something interesting happens when it encountersan invalid character.
piconv -C ...
-p
Transliterate characters missing in encoding to \x{HHHH} where HHHH is the hexadecimal Unicode code point.
piconv -p ...
--htmlcref
Transliterate characters missing in encoding to &#NNN; where NNN is the decimal Unicode code point.
piconv --htmlcref ...
--xmlcref
Transliterate characters missing in encoding to &#xHHHH; where HHHH is the hexadecimal Unicode code point.
piconv --xmlcref ...
-D
Invokes debugging mode. Primarily for Encode hackers.
piconv -D ...
-S
Selects which scheme is to be used for conversion. Available schemes are as follows:from_toUses Encode::from_to for conversion. This is the default.decode_encodeInput strings are decode()d then encode()d. A straight two-step implementation.perlioThe 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.
piconv -S ...