Req #72908 [Opn->Fbk]: there is no mb_xxx function for readdir

From: Date: Sat, 20 Aug 2016 19:41:33 +0000
Subject: Req #72908 [Opn->Fbk]: there is no mb_xxx function for readdir
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203428@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72908&edit=1 ID: 72908 Updated by: ab@php.net Reported by: montdm at montdm dot shost dot ca Summary: there is no mb_xxx function for readdir -Status: Open +Status: Feedback Type: Feature/Change Request Package: *Directory/Filesystem functions Operating System: Windows PHP Version: 7.1.0beta3 Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2016-08-20 19:34:09] montdm at montdm dot shost dot ca Description: ------------ --- From manual page: http://www.php.net/function.readdir --- The names of the files/directories on windows operating system are automatically encoding in windows-1252. When using readdir, if you use international encoding utf-8, the specials characters like é in the files/directories are badly return by readdir. So you need to use a second fonction, mb_convert_encoding, to have the good name of the files/directories. I suggest to create a new function mb_readdir which will work like all mb_ functions on strings Best regards ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72908&edit=1

« previous php.bugs (#203428) next »