I am using php glob() function to find matching files in a directory.
glob("*.txt");
It works for filenames with ascii characters e.g. sports.txt, frys.txt etc. However, it does not work with filenames that contain non-ascii character such as pénètre.txt.
Any thoughts?
I tried to run this code to my local computer
<?php
foreach (glob("*.html") as $filename) {
echo "$filename size " . filesize($filename) . "
<br>";
}
?>
and I included a file named pènétre as you wrote, but I got a clear output without any error:
cookie.html size 357
pénètre.html size 7719
My PHP version is 1.6.2. Try to run this code as well and tell me if you experience any problem.