in reply to Substitute some Unicodes with their escapes
Two things that are still unclear to me from your description are whether you've got use utf8; for code like $_table{'Ö'} (or if that was just an example here), and whether your strings containing Unicode are properly decoded or not - please show one of your strings using Dump from Devel::Peek, and show an SSCCE that reproduces your situation.
In any case, a regex that matches non-ASCII characters (or bytes, depending on whether your string is decoded or not) is /([^\x00-\x7F])/.
Minor edits.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Substitute some Unicodes with their escapes
by jjmoka (Beadle) on Jun 09, 2020 at 11:31 UTC | |
by choroba (Cardinal) on Jun 09, 2020 at 13:53 UTC | |
by jjmoka (Beadle) on Jun 09, 2020 at 14:54 UTC | |
by haukex (Archbishop) on Jun 09, 2020 at 23:49 UTC | |
by jjmoka (Beadle) on Jun 10, 2020 at 00:16 UTC |