|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37902 include() and family do not use filesystem encoding
Submitted: 2006-06-23 15:58 UTC Modified: 2006-08-24 15:24 UTC
From: Assigned: pollita (profile)
Status: Closed Package: Unicode Engine related
PHP Version: 6CVS-2006-06-23 (CVS) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
32 + 46 = ?
Subscribe to this entry?

 [2006-06-23 15:58 UTC]
It seems that fopen_for_include uses runtime encoding, not filesystem encoding.

Reproduce code:
unicode_semantics = on
unicode.output_encoding = utf-8
unicode.runtime_encoding = iso-8859-1
unicode.script_encoding = utf-8
unicode.filesystem_encoding = utf-8

<?php include "caf?.php"; >

caf?.php (UTF-8 name)
<?php echo "in caf?\n"; ?>

Expected result:
in caf?

Actual result:
Warning: include(caf?.php): failed to open stream: No such file or directory in /home/andrei/dev/php-src/f.php on line 1

Warning: include(): Failed opening 'caf?.php' for inclusion (include_path='.') in /home/andrei/dev/php-src/f.php on line 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-24 15:24 UTC]
I think Sara has fixed this already.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 06:01:34 2024 UTC