phpfm
phpfm copied to clipboard
Updating is_binary function
Resolve issue #70
The current function check if "text" or "x-empty" is in the mimetype to determine if it's a binary or not.
We have some files flagged as application/javascript that are considered as binary even if they are not.
This PR correct it by relying on file encoding. The flaw is that it depends on mbstring (might not be installed everywhere) so the legacy function is still here for fallback.
Thanks, i will test and merge.