Skip to content

Commit 3554649

Browse files
committed
Add another test for UTF-7 text conversion
1 parent 51b6c68 commit 3554649

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/mbstring/tests/utf_encodings.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,9 @@ $encoded = encode("\x12\x34", 'UTF-16BE'); // 3 Base64 bytes, 2 bits of padding.
10211021
$corrupted = substr($encoded, 0, 2) . chr(ord($encoded[2]) + 1);
10221022
testInvalidString('+' . $corrupted . '-', "\x00\x00\x12\x34\x00\x00\x00%", 'UTF-7', 'UTF-32BE');
10231023

1024+
// Characters which are not Base64 (and not even ASCII) appearing in Base64 section
1025+
testInvalidString("+\x80", "\x00\x00\x00%", 'UTF-7', 'UTF-32BE');
1026+
10241027
echo "Done!\n";
10251028

10261029
?>

0 commit comments

Comments
 (0)