reading files with accents in the filename from PHP [message #183106] |
Wed, 09 October 2013 10:33 |
Erwin Moller
Messages: 228 Registered: September 2010
Karma:
|
Senior Member |
|
|
Hello comp.lang.php,
How can PHP open files on the local filesystem that contain certain
characters, like umlauts, accents, etc?
I am currently developing on Win2008 with PHP 5.5.1 (CGI/FastCGI).
So the underlying filesystem is NTFS.
Files with names like the following are inaccessible:
ierländer.pdf
Eugène.pdf
etc.
All files without these characters ARE readable.
I test with:
$bIsReadable = ((file_exists($path)) && (is_readable($path)));
and these kind of filenames ALWAYS return false.
The files with the troublesome names open fine with a PDF reader.)
(It wouldn't be my own choice to store files under such names, but
that's how it is now.)
Background: Currently I am working on a Full Text Index on a whole bunch
of PDF files, and I need to access them from PHP in the process.
Does anybody know how to fix this problem?
How do I open files with accents in their filename?
Regards,
Erwin Moller
PS: I found this, which might be relevant:
http://evertpot.com/filesystem-encoding-and-php/
but it doesn't solve the issue.
--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
|
|
|