in reply to Re: Re: Perl Monks in other languages?
in thread Perl Monks in other languages?
You need to entitize all characters not within the latin-1 reptiore. I /belive/ this code will do it, assuming $_ is your text, stored as "proper" utf8, with perl's utf-8 flag set.
my $ord; s/(.)/$ord=ord $1; if ($ord < 128) { $1; } else { "&#$1;"; } /ge;
|
|---|