in reply to Re: Substituting unicode character leaves special block
in thread Substituting unicode character leaves special block
You might want to clarify the encoding of your example. You do not use utf8;, yet you have a literal 'µ'. So, if you have an editor which saves this as UTF-8, then $micro is a string of two characters, and your substitution replaces the very same two characters with an u. This is what I'd call "works by accident".
To make it more interesting, your code contains the HTML escape &956; which is GREEK SMALL LETTER MU and not the MICRO SIGN, &b2; from the question. These look pretty much the same, but are different characters. Your GREEK SMALL LETTER MU can not be represented in Perl's default character set!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Substituting unicode character leaves special block
by hippo (Archbishop) on Mar 18, 2023 at 12:11 UTC | |
by LanX (Saint) on Mar 18, 2023 at 12:47 UTC | |
|
Re^3: Substituting unicode character leaves special block
by LanX (Saint) on Mar 17, 2023 at 22:25 UTC |