in reply to Convert word special characters
In case it should turn out that Word can't encode the XML itself, you could use
use HTML::Entities qw(encode_entities_numeric); # unicode/character string my $in = qq(Sample data & and text for some <conversion> \x{201C}text\ +x{201D}.); print encode_entities_numeric($in); __END__ Sample data & and text for some <conversion> “te +xt”.
(that is, if you can get away without the (IMHO superfluous) leading zeros in the hex values...)
|
|---|