diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php index 9e1c3a290969d587d7b52d89cfe8aa2e876ccc08..f93568e29c646a6cc427bcf630f86aacc86a6446 100644 --- a/ecrire/inc/utils.php +++ b/ecrire/inc/utils.php @@ -313,8 +313,12 @@ function _request($var, $c=false) { AND isset($GLOBALS['meta']['charset']) AND $GLOBALS['meta']['charset'] != 'utf-8' AND is_string($a) - AND preg_match(',[\x80-\xFF],', $a)) { - include_spip('inc/charsets'); + // check rapide mais pas fiable + AND preg_match(',[\x80-\xFF],', $a) + // check fiable + AND include_spip('inc/charsets') + AND is_utf8($a) + ) { return importer_charset($a, 'utf-8'); }