views:

25

answers:

1
$perl -e 'use HTML::Entities; print encode_entities("<te£st>");'
&lt;te&Acirc;&pound;st&gt;

I'm expecting to see:

&lt;te&pound;st&gt;
+2  A: 
use utf8;

(put that at the top of the script).

aidan
Add something like "That informs the perl interpreter that your source code contains literal utf8."
ysth