PICONV(1) Perl Programmers Reference Guide PICONV(1) #
PICONV(1) Perl Programmers Reference Guide PICONV(1)
NNAAMMEE #
piconv -- iconv(1), reinvented in perl
SSYYNNOOPPSSIISS #
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
DDEESSCCRRIIPPTTIIOONN #
ppiiccoonnvv is perl version of iiccoonnvv, a character encoding converter 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.
piconv converts the character encoding of either STDIN or files specified
in the argument and prints out to STDOUT.
Here is the list of options. Some options can be in short format (-f) or
long (--from) one.
-f,--from _f_r_o_m___e_n_c_o_d_i_n_g
Specifies the encoding you are converting from. Unlike iiccoonnvv, this
option can be omitted. In such cases, the current locale is used.
-t,--to _t_o___e_n_c_o_d_i_n_g
Specifies the encoding you are converting to. Unlike iiccoonnvv, this
option can be omitted. In such cases, the current locale is used.
Therefore, when both -f and -t are omitted, ppiiccoonnvv just acts like
ccaatt.
-s,--string _s_t_r_i_n_g
uses _s_t_r_i_n_g instead of file for the source of text.
-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 _e_n_c_o_d_i_n_g___a_l_i_a_s
Resolve _e_n_c_o_d_i_n_g___a_l_i_a_s 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".
-p,--perlqq
Transliterate characters missing in encoding to \x{HHHH} where HHHH
is the hexadecimal Unicode code point.
--htmlcref
Transliterate characters missing in encoding to &#NNN; where NNN is
the decimal Unicode code point.
--xmlcref
Transliterate characters missing in encoding to &#xHHHH; where HHHH
is the hexadecimal Unicode code point.
-h,--help
Show usage.
-D,--debug
Invokes debugging mode. Primarily for Encode hackers.
-S,--scheme _s_c_h_e_m_e
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 ddeeccooddee(())d then eennccooddee(())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.
SSEEEE AALLSSOO #
iiccoonnvv(1) llooccaallee(3) Encode Encode::Supported Encode::Alias PerlIO
perl v5.36.3 2024-03-20 PICONV(1)