in reply to Substitute some Unicodes with their escapes
Have you looked at HTML::Entities, which has
$encoded = encode_entities($input, '^\n\x20-\x25\x27-\x7e');
... which should be more or less what your table does.
If you have other characters that should not be encoded, you can add them to the above range.
Update: See also HTML::HTML5::Entities, which even allows you to bring your own entity tables.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Substitute some Unicodes with their escapes
by jjmoka (Beadle) on Jun 09, 2020 at 14:57 UTC | |
|
Re^2: Substitute some Unicodes with their escapes
by Anonymous Monk on Jun 09, 2020 at 15:05 UTC |