in reply to Re^4: any use of 'use locale'? (source encoding)
in thread any use of 'use locale'?
adds warning "Wide character in print at..."
You can't output characters to STDOUT without instructing Perl how to convert those characters into bytes. I provided the fix for that at the bottom of my previous post.
So, in bug report i intentionally let "use utf8" out, cause my locale is UTF8.
Your locale is not used to determine the encoding of the source file. You may see uc("abcõäöü") in your editor, but you told Perl uc("abcõäöüšž"). Check the length() of the string for fun...
but if UTF-8 defines something being digit (\d) or word character (\w), then should it be like that in perl too...
There are so many problems with your statement.
-
UTF-8 doesn't define anything of the sort.
-
Unicode does define digit and letter properties, but not what Perl allows in identifiers (\w).
-
Perl can match those two Unicode properties (and the other hundred) through \p.
-
Why should Perl only recognize Unicode. What about locales? You yourself want it to recognize locales. What about POSIX? What about what backwards compatibility? What about 99% of the people who use \d and \w to mean /[0-9]/ and /[a-zA-Z0-9_]/? Under Unicode, they would match much more.
So yeah, Perl allows you to match the Unicode properties. It also allows you do other things too. Sorry, but you don't get to break just about every program that uses \d and \w.