@@ -638,7 +638,8 @@ public function __construct($code, $eclevel = 'L') {
638638 $ barcode_array ['bcode ' ] = array ();
639639 foreach ($ qrTab as $ line ) {
640640 $ arrAdd = array ();
641- foreach (str_split ($ line ) as $ char ) {
641+ $ chars = function_exists ('mb_str_split ' ) ? mb_str_split ($ line ) : str_split ($ line );
642+ foreach ($ chars as $ char ) {
642643 $ arrAdd [] = ($ char =='1 ' )?1 :0 ;
643644 }
644645 $ barcode_array ['bcode ' ][] = $ arrAdd ;
@@ -1307,7 +1308,8 @@ protected function eatNum() {
13071308 return $ this ->eatAn ();
13081309 }
13091310 }
1310- $ this ->items = $ this ->appendNewInputItem ($ this ->items , QR_MODE_NM , $ run , str_split ($ this ->dataStr ));
1311+ $ data = function_exists ('mb_str_split ' ) ? mb_str_split ($ this ->dataStr ) : str_split ($ this ->dataStr );
1312+ $ this ->items = $ this ->appendNewInputItem ($ this ->items , QR_MODE_NM , $ run , $ data );
13111313 return $ run ;
13121314 }
13131315
@@ -1346,7 +1348,8 @@ protected function eatAn() {
13461348 return $ this ->eat8 ();
13471349 }
13481350 }
1349- $ this ->items = $ this ->appendNewInputItem ($ this ->items , QR_MODE_AN , $ run , str_split ($ this ->dataStr ));
1351+ $ data = function_exists ('mb_str_split ' ) ? mb_str_split ($ this ->dataStr ) : str_split ($ this ->dataStr );
1352+ $ this ->items = $ this ->appendNewInputItem ($ this ->items , QR_MODE_AN , $ run , $ data );
13501353 return $ run ;
13511354 }
13521355
@@ -1359,7 +1362,8 @@ protected function eatKanji() {
13591362 while ($ this ->identifyMode ($ p ) == QR_MODE_KJ ) {
13601363 $ p += 2 ;
13611364 }
1362- $ this ->items = $ this ->appendNewInputItem ($ this ->items , QR_MODE_KJ , $ p , str_split ($ this ->dataStr ));
1365+ $ data = function_exists ('mb_str_split ' ) ? mb_str_split ($ this ->dataStr ) : str_split ($ this ->dataStr );
1366+ $ this ->items = $ this ->appendNewInputItem ($ this ->items , QR_MODE_KJ , $ p , $ data );
13631367 $ run = $ p ;
13641368 return $ run ;
13651369 }
@@ -1409,7 +1413,8 @@ protected function eat8() {
14091413 }
14101414 }
14111415 $ run = $ p ;
1412- $ this ->items = $ this ->appendNewInputItem ($ this ->items , QR_MODE_8B , $ run , str_split ($ this ->dataStr ));
1416+ $ data = function_exists ('mb_str_split ' ) ? mb_str_split ($ this ->dataStr ) : str_split ($ this ->dataStr );
1417+ $ this ->items = $ this ->appendNewInputItem ($ this ->items , QR_MODE_8B , $ run , $ data );
14131418 return $ run ;
14141419 }
14151420
0 commit comments