Skip to content

Commit 26edd5b

Browse files
committed
Merge pull request #100 from mundschenk-at/ini_set_removal
Use mb_substitute_character inset of ini_set
2 parents bb79919 + 9f3667c commit 26edd5b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/HTML5/Parser/UTF8Utils.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ public static function convertToUTF8($data, $encoding = 'UTF-8')
9494
// application executing this library so we store the value, change it
9595
// to our needs, and then change it back when we are done. This feels
9696
// a little excessive and it would be great if there was a better way.
97-
$save = ini_get('mbstring.substitute_character');
98-
ini_set('mbstring.substitute_character', "none");
97+
$save = mb_substitute_character();
98+
mb_substitute_character('none');
9999
$data = mb_convert_encoding($data, 'UTF-8', $encoding);
100-
ini_set('mbstring.substitute_character', $save);
100+
mb_substitute_character($save);
101101
} // @todo Get iconv running in at least some environments if that is possible.
102102
elseif (function_exists('iconv') && $encoding != 'auto') {
103103
// fprintf(STDOUT, "iconv found\n");

0 commit comments

Comments
 (0)