<?xml version="1.0" encoding="windows-1252"?>
<node id="358832" title="VSarkiss's scratchpad" created="2004-06-01 19:41:44" updated="2005-08-11 08:47:23">
<type id="182711">
scratchpad</type>
<author id="72267">
VSarkiss</author>
<data>
<field name="doctext">
&lt;p&gt;This little program works fine to convert a UTF-16 file to UTF-8:
&lt;code&gt;
#! perl
use encoding "utf16", STDOUT =&gt; "utf8";
while (&lt;&gt;) { print }
&lt;/code&gt;
But when I try to do what I think is the same thing from the command line:
&lt;code&gt;
perl -Mencoding=utf16,STDOUT,utf8 -p -e 1 &lt; in &gt; out
&lt;/code&gt;
The resulting file is a whacked semi-utf-16 format.</field>
</data>
</node>
