--TEST--
-Bug #46806 (mb_wtrimwidth cutting to early)
+Bug #46806 (mb_strimwidth cutting too early)
--CREDITS--
Sebastian Schürmann
sebs@php.net
// This behavior is broken, but kept for BC reasons
var_dump(mb_ereg_replace('(%)', '\\\1', 'a%c'));
-// For clarify, the above line is equivalent to:
+// For clarity, the above line is equivalent to:
var_dump(mb_ereg_replace('(%)', '\\\\1', 'a%c'));
?>
toCases("İ");
// Make sure that case-conversion in Turkish still works correctly.
-// Using the language-agnostic Unicode case mappins would result in
+// Using the language-agnostic Unicode case mappings would result in
// characters that are illegal under ISO-8859-9.
mb_internal_encoding('ISO-8859-9');
// EUC-JP string
$euc_jp = 'ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£';
-// Test with sigle "form encoding"
-// Note: For some reason it complains, results are differ. Not reserched.
+// Test with single "form encoding"
+// Note: For some reason it complains, results are different. Not researched.
echo "== BASIC TEST ==\n";
$s = $sjis;
$s = mb_convert_encoding($s, 'EUC-JP', 'SJIS');
// EUC-JP string
$euc_jp = 'ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£';
-// Test for single scaler
-echo "== SCALER TEST ==\n";
+// Test for single scalar
+echo "== SCALAR TEST ==\n";
$s = $sjis;
$encoding = mb_convert_variables('EUC-JP', 'SJIS', $s);
print("$encoding\n"); // SJIS
print("{$oo->s1}{$oo->s2}{$oo->s3}\n"); // Converted to EUC-JP
-// Test for scaler, array and object
-echo "== SCALER, ARRAY AND OBJECT TEST ==\n";
+// Test for scalar, array and object
+echo "== SCALAR, ARRAY AND OBJECT TEST ==\n";
$s1 = $euc_jp;
$s2 = $euc_jp;
?>
--EXPECT--
-== SCALER TEST ==
+== SCALAR TEST ==
SJIS
ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£
JIS
ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£
EUC-JP
ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£
-== SCALER, ARRAY AND OBJECT TEST ==
+== SCALAR, ARRAY AND OBJECT TEST ==
EUC-JP
ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£
ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£
// EUC-JP string
$euc_jp = 'ÆüËܸì¥Æ¥¥¹¥È¤Ç¤¹¡£01234£µ£¶£·£¸£¹¡£';
-// Test with sigle "form encoding"
-// Note: For some reason it complains, results are differ. Not reserched.
+// Test with single "form encoding"
+// Note: For some reason it complains, results are different. Not researched.
echo "== BASIC TEST ==\n";
$s = $sjis;
$s = mb_detect_encoding($s, 'SJIS');
* Test mb_encode_header() with different strings
*/
-echo "*** Testing mb_encode_mimeheader() : basic2 ***\n";
+echo "*** Testing mb_encode_mimeheader() : basic3 ***\n";
//All strings are the same when displayed in their respective encodings
$sjis_string = base64_decode('k/qWe4zqg2WDTINYg2eCxYK3gUIwMTIzNIJUglWCVoJXgliBQg==');
echo "Done";
?>
--EXPECT--
-*** Testing mb_encode_mimeheader() : basic2 ***
+*** Testing mb_encode_mimeheader() : basic3 ***
Language: SJIS
-- Base 64: --