alafarm has asked for the wisdom of the Perl Monks concerning the following question:
$data =~ s/([\x{80}-\x{FFFF}])/'&#' . ord($1) . ';'/gse;
So the registered trademark symbol (®) becomes ®
But now my output needs to be of the form: ®
What would be a similarly simple substitution or other way to make the conversion?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: UTF to character entities
by Anonymous Monk on Sep 28, 2011 at 21:00 UTC |