|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [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: Thu May 30 07:01:30 2024 UTC