php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70551 UTF-8 filename issue
Submitted: 2015-09-22 15:39 UTC Modified: 2016-08-08 09:49 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: revx at gmx dot de Assigned: ab (profile)
Status: Closed Package: Unicode Engine related
PHP Version: master-Git-2015-09-22 (snap) OS: Windows 7
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:
MUST BE VALID
Solve the problem:
20 - 8 = ?
Subscribe to this entry?

 
 [2015-09-22 15:39 UTC] revx at gmx dot de
Description:
------------
If I try to create a directory with UTF-8 characters the result is not as expected.

Expected folder name: Яндекс
Actual result: Яндекс

Even scandir doesn't understand UTF-8 folder- and filenames in PHP 7.
How to handle such files with PHP 7?

PHP version: 7.1.0-dev (Windows)

Test script:
---------------
<?php
mkdir(__DIR__ . '/Яндекс'); 
print_r(scandir(__DIR__));


Expected result:
----------------
Array
(
    [0] => .
    [1] => ..
    [2] => Яндекс

Actual result:
--------------
Array
(
    [0] => .
    [1] => ..
    [2] => ð»ð¢ð┤ðÁð║Ðü

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-08 09:49 UTC] ab@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: ab
 [2016-08-08 09:49 UTC] ab@php.net
Fixed in PHP 7.1. Please test it carefully and report issues in a new ticket.

Thanks.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Dec 07 19:01:24 2019 UTC