in reply to Re: Why [[:alpha:]] doesn't involve diacritic characters in replace expression?
in thread Why [[:alpha:]] doesn't involve diacritic characters in replace expression?
It doesn't explain why you are getting what you get, but the use of \w, \W, [:alpha:], [:word:], etc is problematic in Perl, if the string you're matching against contains characters in the range 128-255, and no characters above
To guard against that, you can use Unicode::Semantics, or utf8::upgrade on the string prior to matching.
That said I'd stay with the Unicode properties in regexes, and only revert to locales if you really need language dependent behavior. For a task like identifying printable and non-printable characters, Unicode is most likely the better choice.
|
|---|