in reply to Substituting unicode character leaves special block

If $contents has the UTF-8 flag activated - i.e. it was properly decoded - then replace the two characters as such.

Please shows us the output of Devel::Peek::Dump() before and after the substitution.

See https://perldoc.perl.org/utf8 for more on the two flavors of strings in Perl, octet strings and character strings.

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re: Substituting unicode character leaves special block