Bug #67277 [Fbk->NoF]: glob ignores files with wrongly encoded chars

From: Date: Sun, 26 Sep 2021 04:22:13 +0000
Subject: Bug #67277 [Fbk->NoF]: glob ignores files with wrongly encoded chars
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236839@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67277&edit=1

 ID:               67277
 Updated by:       php-bugs@lists.php.net
 Reported by:      l dot werner at sprengnetter dot de
 Summary:          glob ignores files with wrongly encoded chars
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          Filesystem function related
 Operating System: Ubuntu 10.04
 PHP Version:      5.4.28
 Assigned To:      cmb
 Private report:   N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[2021-09-13 08:14:23] cmb@php.net

Is this still an issue for you with any of the actively supported
PHP versions[1]?

[1] <https://www.php.net/supported-versions.php>

------------------------------------------------------------------------
[2014-05-14 14:20:40] l dot werner at sprengnetter dot de

Description:
------------
We upload files with winscp to our server.
On the server we have an script which imports these files.

Some of the files have german umlauts.
These are somewhat wrongly encoded.
When I try to use glob to read all files in an dir with such an file this file will be silently
ignored.

Test script:
---------------
> ls -l
total 972
-rw-r--r--+ 1 dholler dholler  69288 2014-04-08 12:21 00442_115_102_GBA.pdf
-rw-r--r--+ 1 dholler dholler 211968 2014-04-08 12:27 00442_305_31_ueber_2013_1[1].xls
-rw-r--r--+ 1 dholler dholler  19523 2014-04-08 14:55 00442_325_32_stob3_2013_1_1_.xlsx
-rw-r--r--+ 1 dholler dholler 142640 2014-04-25 09:35 00442 BV-001.jpg
-rw-r--r--+ 1 dholler dholler 120271 2014-04-25 09:35 00442 BV-002.jpg
-rw-r--r--+ 1 dholler dholler 277317 2014-04-23 08:20 00442 Einverst?ndniserkl?rung.pdf
-rw-r--r--+ 1 dholler dholler 124950 2014-04-25 09:31 00442 SolumGBA.pdf
-rw-r--r--+ 1 dholler dholler  17920 2014-04-25 09:42 Thumbs.db


> echo '<?php print_r(glob("*"));' | php
Array
(
    [0] => 00442_115_102_GBA.pdf
    [1] => 00442_305_31_ueber_2013_1[1].xls
    [2] => 00442_325_32_stob3_2013_1_1_.xlsx
    [3] => 00442 BV-001.jpg
    [4] => 00442 BV-002.jpg
    [5] => 00442 SolumGBA.pdf
    [6] => Thumbs.db
)





Expected result:
----------------
File will not be ignored an i get an error message or even better the file can be handled.

Actual result:
--------------
File is ignored.


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=67277&edit=1


Thread (3 messages)

« previous php.bugs (#236839) next »