Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ext/mbstring/tests/euc_tw_encoding.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ mbstring
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
if (PHP_INT_SIZE == 4 && !extension_loaded("ctype")) die("skip needs ctype extension on 32-bit");
?>
--FILE--
<?php
Expand Down
3 changes: 2 additions & 1 deletion ext/mbstring/tests/gb18030_2022_encoding.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ mbstring
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
if (PHP_INT_SIZE == 4 && !extension_loaded("ctype")) die("skip needs ctype extension on 32-bit");
?>
--FILE--
<?php
Expand Down Expand Up @@ -211,7 +212,7 @@ function readGB18030_2022_ConversionTable($path, &$from, &$to, $utf32 = false) {
// We may be on a 32-bit machine and testing a text encoding with 4-byte codes
// (which can't be represented in a PHP integer)
$char = "";
for ($i = 2; $i < strlen($line); $i += 2) {
for ($i = strpos($line, "\t") + 1; $i < strlen($line); $i += 2) {
$substr = substr($line, $i, 2);
if (ctype_xdigit($substr))
$char .= chr(hexdec($substr));
Expand Down