FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » reading files with accents in the filename from PHP
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
reading files with accents in the filename from PHP [message #183106] Wed, 09 October 2013 10:33 Go to previous message
Erwin Moller is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PDO - Cannot retrieve warnings with emulated prepares disabled
Next Topic: Secure website
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 12:05:43 GMT 2024

Total time taken to generate the page: 0.04678 seconds