Bug #67277 [NEW]: glob ignores files with wrongly encoded chars
| From: | l dot werner at sprengnetter dot de | Date: | Wed, 14 May 2014 14:20:41 +0000 |
| Subject: | Bug #67277 [NEW]: glob ignores files with wrongly encoded chars | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-185821@lists.php.net to get a copy of this message | ||
From: l dot werner at sprengnetter dot de
Operating system: Ubuntu 10.04
PHP version: 5.4.28
Package: *General Issues
Bug Type: Bug
Bug description:glob ignores files with wrongly encoded chars
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 bug report at https://bugs.php.net/bug.php?id=67277&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67277&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67277&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67277&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=67277&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=67277&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=67277&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=67277&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=67277&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=67277&r=support
Expected behavior: https://bugs.php.net/fix.php?id=67277&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=67277&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=67277&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=67277&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67277&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=67277&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=67277&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=67277&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67277&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=67277&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=67277&r=mysqlcfg