'br}

'br}

{\

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 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.0, but you can use piconv in the place of iconv for virtually any case.

piconv converts the character encoding of either s-1STDINs0 or files specified in the argument and prints out to s-1STDOUT.s0

Here is the list of options. Some options can be in short format (-f) or long (--from) one.

-f,--from \fIfrom_encoding\fR 4

Specifies the encoding you are converting from. Unlike iconv, this option can be omitted. In such cases, the current locale is used.

-t,--to \fIto_encoding\fR 4

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.

-s,--string \fIstring\fR 4

uses string instead of file for the source of text.

-l,--list 4

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 *(L"latin1*(R" for *(L"s-1ISO-8859-1*(R",s0 or *(L"ibm850*(R" instead of *(L"cp850*(R", or *(L"winlatin1*(R" for *(L"cp1252*(R". See Encode::Supported for a full discussion.

-r,--resolve \fIencoding_alias\fR 4

Resolve encoding_alias to Encode canonical encoding name.

-C,--check \fIN\fR 4

Check the validity of the stream if N = 1. When N = -1, something interesting happens when it encounters an invalid character.

-c 4

Same as f(CW*(C`-C 1*(C'.

-p,--perlqq 4

Transliterate characters missing in encoding to ex{s-1HHHHs0} where s-1HHHHs0 is the hexadecimal Unicode code point.

--htmlcref 4

Transliterate characters missing in encoding to &#NNN; where s-1NNNs0 is the decimal Unicode code point.

--xmlcref 4

Transliterate characters missing in encoding to &#xHHHH; where s-1HHHHs0 is the hexadecimal Unicode code point.

-h,--help 4

Show usage.

-D,--debug 4

Invokes debugging mode. Primarily for Encode hackers.

-S,--scheme \fIscheme\fR 4

Selects which scheme is to be used for conversion. Available schemes are as follows:

from_to 4

Uses Encode::from_to for conversion. This is the default.

decode_encode 4

Input strings are decode()d then encode()d. A straight two-step implementation.

perlio 4

The new perlIO layer is used. s-1NI-Ss0' favorite.

You should use this option if you are using s-1UTF-16s0 and others which linefeed is not $/.

Like the -D option, this is also for Encode hackers.

SEE ALSO

iconv|(1) locale|(3) Encode Encode::Supported Encode::Alias PerlIO