php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72901 realpath() not utilizing UTF-8
Submitted: 2016-08-19 22:28 UTC Modified: 2017-10-22 20:07 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: bugzilla77 at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 7.1.0beta3 OS: Win10 x64 Polish
Private report: No CVE-ID: None
 [2016-08-19 22:28 UTC] bugzilla77 at gmail dot com
Description:
------------
https://github.com/php/php-src/blob/php-7.1.0beta3/UPGRADING

The recommended way to handle file paths, I/O and other related topics is by utilizing UTF-8.

Test script:
---------------
<?php
 print(realpath('żółć.txt')); // stript UTF-8 encoded
?>

Expected result:
----------------
c:/htdocs/żółć.txt (UTF-8 encoded)

Actual result:
--------------
realpath() not utilizing UTF-8

For example: filesize(), filemtime(), readfile() are utilizing UTF-8

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-19 23:56 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2016-08-19 23:56 UTC] ab@php.net
Thanks for the report. Please be sure your file does actually exist and you're in the right CWD (or better use an absolute path). realpath() will return false, if a file doesn't exist. Fe, running touch('żółć.txt'); realpath('żółć.txt'); there's no issue. Please check and give more info.

Thanks.
 [2016-08-28 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2017-10-22 20:07 UTC] ab@php.net
-Status: No Feedback +Status: Not a bug
 [2017-10-22 20:07 UTC] ab@php.net
This doesn't turn to be a UTF-8 issue after all. The corresponding PHP settings have to be met. Please report with more details otherwise.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 05:01:29 2024 UTC