diff options
author | Christian Schneider | 2022-12-12 16:55:47 +0100 |
---|---|---|
committer | Christian Schneider | 2022-12-12 16:55:47 +0100 |
commit | 55bd4e0052b830256ad1d1134bbe5c7231d1427b (patch) | |
tree | 49d4980bb599db87085b75c7780dc6138ad681db /it_xml.class | |
parent | d6f07d7e1350c57e59192ba0047a8431fc59cdf3 (diff) | |
download | itools-55bd4e0052b830256ad1d1134bbe5c7231d1427b.tar.gz itools-55bd4e0052b830256ad1d1134bbe5c7231d1427b.tar.bz2 itools-55bd4e0052b830256ad1d1134bbe5c7231d1427b.zip |
Add and use it::utf8_decode and it::utf8_encode for easier migration to PHP 8.2
Diffstat (limited to 'it_xml.class')
-rw-r--r-- | it_xml.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_xml.class b/it_xml.class index 62b4df5..7765054 100644 --- a/it_xml.class +++ b/it_xml.class @@ -141,7 +141,7 @@ function _sanitize($xmldata, $isutf8 = null) # Encode non-utf8 characters in a string, leave utf8 alone static function _utf8_fix($str) { - return preg_match('/^([\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]|[\xf0-\xf7][\x80-\xbf][\x80-\xbf][\x80-\xbf])$/', $str) ? $str : utf8_encode($str); + return preg_match('/^([\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]|[\xf0-\xf7][\x80-\xbf][\x80-\xbf][\x80-\xbf])$/', $str) ? $str : it::utf8_encode($str); } function consume(/* $p */) |