summaryrefslogtreecommitdiff
path: root/it_xml.class
diff options
context:
space:
mode:
authorChristian Schneider2022-12-12 16:55:47 +0100
committerChristian Schneider2022-12-12 16:55:47 +0100
commit55bd4e0052b830256ad1d1134bbe5c7231d1427b (patch)
tree49d4980bb599db87085b75c7780dc6138ad681db /it_xml.class
parentd6f07d7e1350c57e59192ba0047a8431fc59cdf3 (diff)
downloaditools-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.class2
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 */)