Unicode has separate characters for bold or italic characters, e.g. U+1D43B is an italic H. See https://unicode-search.net/unicode-namesearch.pl?term=mathematical for list of these.
When a user copies a chemical formulae from an electronic textbook, they may actually be copying these characters instead of the Latin-1 characters, so instead of "H2O" they are copying "U+1D43B U+2082 U+1D442". It looks like H2O when they paste it in the search form. But they'll get no results because it's not latin characters.
So, I need to translate these characters to Latin-1 characters in Perl. The Text::Unidecode library doesn't seem to recognise these.
I tried using transliteration,
y/\x{1d434}-\x{1d467}/A-Za-z/
but this doesn't seem to work at all.
Is there a way to use the translation operator on unicode character ranges? Or is there a library that will do this?