src/Utility/Mime.php
public static function getEncoding($file = null, $default = 'utf-8') {
		if (!function_exists('finfo_open')) {
			return $default;
		}
		$finfo = finfo_open(FILEINFO_MIME_ENCODING);
		$encoding = finfo_file($finfo, $file);
		finfo_close($finfo);
		if ($encoding !== false) {
			return $encoding;
		}
		return $default;
	}
public static function getEncoding($file = null, $default = 'utf-8') {
		if (!function_exists('finfo_open')) {
			return $default;
		}
		$finfo = finfo_open(FILEINFO_MIME_ENCODING);
		$encoding = finfo_file($finfo, $file);
		finfo_close($finfo);
		if ($encoding !== false) {
			return $encoding;
		}
		return $default;
	}
public static function getEncoding ( $ file = null , $ default = 'utf-8' ) { if ( ! function_exists ( 'finfo_open' ) ) { return $ default ; } $ finfo = finfo_open ( FILEINFO_MIME_ENCODING ) ; $ encoding = finfo_file ( $ finfo , $ file ) ; finfo_close ( $ finfo ) ; if ( $ encoding !== false ) { return $ encoding ; } return $ default ; }
Get encoding.

@param string|null $file
@param string $default
@return string
Get encoding .