Edit report at https://bugs.php.net/bug.php?id=64684&edit=1
ID: 64684 Updated by: a...@php.net Reported by: rg at mejoramos dot com Summary: FILEINFO_MIME_ENCODING fail -Status: Open +Status: Feedback Type: Bug Package: *Directory/Filesystem functions Operating System: Windoqs and Linux PHP Version: 5.3.24 Block user comment: N Private report: N New Comment: I can't reproduce this using your snippet, I get us-ascii and that will be it in any case. For that I've created a file containing just 0. And, you might anyway be interested on the next 5.4 release as libmagic was upgraded, or already test the latest windows snapshot from http://windows.php.net/downloads/snaps/php-5.4/ . To reproduce this issue a reliable snippet in required. Previous Comments: ------------------------------------------------------------------------ [2013-04-20 14:28:05] rg at mejoramos dot com Description: ------------ If FILE have contain exactly the string: "0" without quotes, then: in Windows output: Warning: finfo_file(): Failed identify data 0:(null) in ... in Linux output: Warning: finfo_file() [function.finfo-file]: Failed identify data 0:(null) in ... Why file have a "0" ? becouse I need read a integer in range 0-25 to take some decisions... Why I run finfo_file() ? Becouse I need know if last edition create UTF8 or ISO-8859-1 Test script: --------------- echo 'Encoding: '.finfo_file($finfo,$_FILES['name_in_FORM']['tmp_name'],FILEINFO_MIME_ENCODING); Remember: target file contain only the string: "0" without quotes. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64684&edit=1