diff options
author | Matt Butcher <[email protected]> | 2016-03-19 11:39:29 -0600 |
---|---|---|
committer | Matt Butcher <[email protected]> | 2016-03-19 11:39:29 -0600 |
commit | 26edd5b95c45853271f34fb1437e842c46500ecc (patch) | |
tree | e25233d0387aeb6ed2faea07064dfbd4dd717b16 | |
parent | bb79919ffc7df4914ff5a489cf2ad2ad0602ff88 (diff) | |
parent | 9f3667c662474396399c7c240af86b9d2c322b9e (diff) |
Merge pull request #100 from mundschenk-at/ini_set_removal
Use mb_substitute_character inset of ini_set
-rw-r--r-- | src/HTML5/Parser/UTF8Utils.php | 6 |
1 files 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"); |