I'm stuck here and could not find any good search keywords to answer my question. So, sorry if this is already answered elsewhere.
I'm working on a SLES Linux with UTF-8 support switched on. Given is a file which contains german umlauts in its name (e.g. 'Fehler für Projekt x.xls') The following code worked perfectly on an older SLES:
On this machine, it is possible to useunless (opendir(DIR,$scandir)) { confess "can't open the directory $scandir: $@"; } @files=grep {-f "$scandir/$_"} readdir(DIR);
but as soon as I concatenate the retrieved filename with some other string, e.g. "$scandir/$_" or $scandir."/".$_ or $scandir."/".$files[0], "-f" does not work any more plus I cannot copy or move $scandir."/".$files[0]. Is there any general setting that I have to do in my perl code to treat utf files correctly? I already tried "use utf8;" or 'use encoding "utf8";' but these did not make a difference.chdir ($scandir); opendir(DIR,'.'); @files=grep {-f $_} readdir(DIR);
Thanks for your help
Mike
In reply to treat files with umlauts (utf) by mike.scharnow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |