PHP Classes

BUG IN DetectEncoding

Recommend this page to a friend!

      PHP Detect Encoding  >  All threads  >  BUG IN DetectEncoding  >  (Un) Subscribe thread alerts  
Subject:BUG IN DetectEncoding
Summary:you have tiny mistake
Messages:1
Author:Mahdi Pourlotfi
Date:2017-08-24 09:41:45
 

  1. BUG IN DetectEncoding   Reply   Report abuse  
Picture of Mahdi Pourlotfi Mahdi Pourlotfi - 2017-08-24 09:41:45
hi
thanks for your [DetectEncoding] class!!!!

PLEASE
REPLACE:

static function from_file($filename, $default_encoding = 'UTF-8') {
return self::detect(@file_get_contents($filename), $default_encoding);
}


TO:
static function from_file($filename, $default_encoding = 'UTF-8') {
return self::from_string(@file_get_contents($filename), $default_encoding);
}