man-pages/man1/piconv.1.html
2021-03-31 01:06:50 +01:00

188 lines
4.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of PICONV</TITLE>
</HEAD><BODY>
<H1>PICONV</H1>
Section: Perl Programmers Reference Guide (1)<BR>Updated: 2020-10-19<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
piconv -- <A HREF="/cgi-bin/man/man2html?1+iconv">iconv</A>(1), reinvented in perl
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<PRE>
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
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>piconv</B> is perl version of <B>iconv</B>, 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.
<P>
piconv converts the character encoding of either <FONT SIZE="-1">STDIN</FONT> or files
specified in the argument and prints out to <FONT SIZE="-1">STDOUT.</FONT>
<P>
Here is the list of options. Some options can be in short format (-f)
or long (--from) one.
<DL COMPACT>
<DT id="1">-f,--from <I>from_encoding</I><DD>
Specifies the encoding you are converting from. Unlike <B>iconv</B>,
this option can be omitted. In such cases, the current locale is used.
<DT id="2">-t,--to <I>to_encoding</I><DD>
Specifies the encoding you are converting to. Unlike <B>iconv</B>,
this option can be omitted. In such cases, the current locale is used.
<P>
Therefore, when both -f and -t are omitted, <B>piconv</B> just acts
like <B>cat</B>.
<DT id="3">-s,--string <I>string</I><DD>
uses <I>string</I> instead of file for the source of text.
<DT id="4">-l,--list<DD>
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 ``<FONT SIZE="-1">ISO-8859-1'',</FONT> or ``ibm850''
instead of ``cp850'', or ``winlatin1'' for ``cp1252''. See Encode::Supported
for a full discussion.
<DT id="5">-r,--resolve <I>encoding_alias</I><DD>
Resolve <I>encoding_alias</I> to Encode canonical encoding name.
<DT id="6">-C,--check <I>N</I><DD>
Check the validity of the stream if <I>N</I> = 1. When <I>N</I> = -1, something
interesting happens when it encounters an invalid character.
<DT id="7">-c<DD>
Same as <TT>&quot;-C 1&quot;</TT>.
<DT id="8">-p,--perlqq<DD>
Transliterate characters missing in encoding to \x{<FONT SIZE="-1">HHHH</FONT>} where <FONT SIZE="-1">HHHH</FONT> is the
hexadecimal Unicode code point.
<DT id="9">--htmlcref<DD>
Transliterate characters missing in encoding to &amp;#NNN; where <FONT SIZE="-1">NNN</FONT> is the
decimal Unicode code point.
<DT id="10">--xmlcref<DD>
Transliterate characters missing in encoding to &amp;#xHHHH; where <FONT SIZE="-1">HHHH</FONT> is the
hexadecimal Unicode code point.
<DT id="11">-h,--help<DD>
Show usage.
<DT id="12">-D,--debug<DD>
Invokes debugging mode. Primarily for Encode hackers.
<DT id="13">-S,--scheme <I>scheme</I><DD>
Selects which scheme is to be used for conversion. Available schemes
are as follows:
<DL COMPACT><DT id="14"><DD>
<DL COMPACT>
<DT id="15">from_to<DD>
Uses Encode::from_to for conversion. This is the default.
<DT id="16">decode_encode<DD>
Input strings are <B>decode()</B>d then <B>encode()</B>d. A straight two-step
implementation.
<DT id="17">perlio<DD>
The new perlIO layer is used. <FONT SIZE="-1">NI-S</FONT>' favorite.
<P>
You should use this option if you are using <FONT SIZE="-1">UTF-16</FONT> and others which
linefeed is not $/.
</DL>
</DL>
<DL COMPACT><DT id="18"><DD>
<P>
Like the <I>-D</I> option, this is also for Encode hackers.
</DL>
</DL>
<A NAME="lbAE">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+iconv">iconv</A></B>(1)
<B><A HREF="/cgi-bin/man/man2html?3+locale">locale</A></B>(3)
Encode
Encode::Supported
Encode::Alias
PerlIO
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="19"><A HREF="#lbAB">NAME</A><DD>
<DT id="20"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="21"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="22"><A HREF="#lbAE">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:23 GMT, March 31, 2021
</BODY>
</HTML>