P is for Practical | |
PerlMonks |
Re: matching characters eg åby davido (Cardinal) |
on May 27, 2020 at 14:46 UTC ( [id://11117340]=note: print w/replies, xml ) | Need Help?? |
Convert from non-native representations at the boundaries; as close to ingress and egress as possible. Here's an example:
The output is:
By converting from an HTML entity at the point closest to ingress you don't have to worry anymore about dealing with a layer that adds complexity to manipulating the string. Think in terms like this:
If you always keep transformations as close to the edge as possible your code will be a lot simpler. Dave
In Section
Seekers of Perl Wisdom
|
|