Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Robbie Hatley
July 7, 2015, 2:07 pm
rate this thread
I've discovered, in my experiments with Unicode,
that the ? wildcard is buggy when used in a fileglob
operator in Perl 5.14, Cygwin port. The bug is as
The ? wildcard works as intended for English.
However, it does NOT work as intended for Русский.
BUT, it can be MADE to work for Русский by doubling it!
For example, О?ег* does NOT match Олег as it should.
However, О??ег* DOES match Олег.
It appears that the ? matches one BYTE, when the
desired behavior is to match one CHARACTER.
Since the Russian characters are all 2 bytes
(in raw code points, or in UTF-16, or in UTF-8)
you have to use a pair of ?? to match one character.
I wonder if this is inherent in many or all Perl builds,
or just in my port?
Midway City, CA, USA
perl -le 'print "4o6e7o4f0w5llc7m"'
- » glob issue: found list is not cleared with new argument
- — Previous thread in » PERL Discussions