in reply to Re^7: treat files with umlauts (utf)
in thread treat files with umlauts (utf)
The OP's posted code does not include an assignment to $scandirIt does not, but the OP does mention UTF-8, so $scandir being UTF-8 is a possibility, to say the least.
The OP's posted code does not contain umlautsIt doesn't have to be umlauts, what matters is whether $scandir is UTF-8. Make this change to your code and see what happens:
use utf8; # just for utf8::upgrade # bytewise, this is already UTF-8... my $scandir = './pm_1080490_utf8_readdir'; #... but we need to flag it as such for # the problem to manifest itself: utf8::upgrade $scandir; # now on to readdir
the OP's posted code does not require use utf8Right, it does not. And use utf8 is not absolutely necessary in the above test code - use -CS/binmode or -CA to initialize $scandir.
If you're referring to the output from that containing: FLAGS = (PADMY,POK,pPOK,UTF8) Then the UTF8 part of that is caused by the umlaut in 'für'.Does that code not answer your:
[use utf8] has nothing to do with the:... flagging variables
Does the first variable have the UTF8 flag or does it not? What about the second variable? Aren't those two strings exactly the same?# under 'use utf8' FLAGS = (PADMY,POK,pPOK,UTF8) ... "f\303\274r"\0 [UTF8 "f\x{fc}r"] # no utf8 FLAGS = (PADMY,POK,pPOK) ... "f\303\274r"\0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: treat files with umlauts (utf)
by mike.scharnow (Initiate) on Apr 07, 2014 at 08:25 UTC |