- From: Philippe-Andre Prindeville <philipp@res.enst.fr>
- Date: Wed, 20 Dec 95 05:48:42 +0100
- To: www-html@www10.w3.org
Hi.
I'm using perl 4.0pl36 (on an HP-UX 9.01 system) and perl 5.000
on a SunOS 4.1.3_U1 system, and I'm trying to convert accented (French)
text to HTML via:
$line =~ s/[&<>\200-\377]/sprintf("&#%d;", unpack("C", $1))/ge;
thinking this would convert all high-bit set characters to their
decimal equivalent as "&#nn;" but this isn't turning out as
expected.
I'm wondering about this. Probably something stupid, but....
Anyone have a quick fix?
Thanks,
-Philip
Received on Tuesday, 19 December 1995 23:49:03 UTC