in reply to Covert to decimal HTML code in encode_entities_numeric

I don't know if encode_entities_numeric() can do it, but if it can't, here is a way to post-process the results:
use warnings; use strict; my $str = "some special chars like € ™ © ®"; $str =~ s/&#x([[:xdigit:]]+)/'&#' . hex($1)/eg; print "$str\n"; __END__ some special chars like € ™ © ®

Replies are listed 'Best First'.
Re^2: Covert to decimal HTML code in encode_entities_numeric
by ppant (Acolyte) on Dec 03, 2015 at 03:32 UTC
    Thanks.