in reply to UTF8 versus \w in pattern matching
Problem #1: You didn't tell Perl the source file is encoded using use utf8;.
Problem #2: You didn't tell Perl how to encode the output for your terminal using something like use open ':std', ':encoding(UTF-8)';.
Finally, you mention \w. Because of a bug, \w doesn't always match characters in the U+7F..U+FF range. This bug is fixed with use 5.014;. That said, you actually used \p{Word}, which isn't affected by this bug.
Seeking work! You can reach me at ikegami@adaelis.com
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: UTF8 versus \w in pattern matching
by mldvx4 (Hermit) on Jul 07, 2021 at 03:45 UTC | |
by ikegami (Patriarch) on Jul 11, 2021 at 05:12 UTC |