From 9f3667c662474396399c7c240af86b9d2c322b9e Mon Sep 17 00:00:00 2001 From: Der Mundschenk & Compagnie Date: Sat, 19 Mar 2016 09:54:38 +0100 Subject: Use mb_substitute_character instead of ini_set --- src/HTML5/Parser/UTF8Utils.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/HTML5/Parser/UTF8Utils.php b/src/HTML5/Parser/UTF8Utils.php index 684d84a..44affb6 100644 --- a/src/HTML5/Parser/UTF8Utils.php +++ b/src/HTML5/Parser/UTF8Utils.php @@ -94,10 +94,10 @@ class UTF8Utils // application executing this library so we store the value, change it // to our needs, and then change it back when we are done. This feels // a little excessive and it would be great if there was a better way. - $save = ini_get('mbstring.substitute_character'); - ini_set('mbstring.substitute_character', "none"); + $save = mb_substitute_character(); + mb_substitute_character('none'); $data = mb_convert_encoding($data, 'UTF-8', $encoding); - ini_set('mbstring.substitute_character', $save); + mb_substitute_character($save); } // @todo Get iconv running in at least some environments if that is possible. elseif (function_exists('iconv') && $encoding != 'auto') { // fprintf(STDOUT, "iconv found\n"); -- cgit v1.2.3