parsing multi-byte strings with xmlify
This commit is contained in:
parent
774a78dbde
commit
18f71c1050
|
@ -175,8 +175,9 @@ if(! function_exists('xmlify')) {
|
||||||
function xmlify($str) {
|
function xmlify($str) {
|
||||||
$buffer = '';
|
$buffer = '';
|
||||||
|
|
||||||
$str_array = preg_split('//u', $str, -1, PREG_SPLIT_NO_EMPTY);
|
$len = mb_strlen($str);
|
||||||
foreach($str_array as $char) {
|
for($x = 0; $x < $len; $x ++) {
|
||||||
|
$char = mb_substr($str,$x,1);
|
||||||
|
|
||||||
switch( $char ) {
|
switch( $char ) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue