We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b374ec3 commit c50172eCopy full SHA for c50172e
ext/mbstring/libmbfl/filters/mbfilter_cp932.c
@@ -65,7 +65,7 @@
65
66
static int mbfl_filt_conv_cp932_wchar_flush(mbfl_convert_filter *filter);
67
68
-static const unsigned char mblen_table_sjis[] = { /* 0x80-0x9f,0xE0-0xFF */
+static const unsigned char mblen_table_sjis[] = { /* 0x81-0x9f,0xE0-0xFF */
69
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
70
71
@@ -74,7 +74,7 @@ static const unsigned char mblen_table_sjis[] = { /* 0x80-0x9f,0xE0-0xFF */
74
75
76
77
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
78
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
79
80
ext/mbstring/tests/mb_strlen.phpt
@@ -35,6 +35,11 @@ print "-- Testing illegal bytes 0x80,0xFD-FF --\n";
35
print mb_strlen("\x80\xA1", 'SJIS') . "\n";
36
print mb_strlen("abc\xFD\xFE\xFF", 'SJIS') . "\n";
37
38
+echo "== CP932 ==\n";
39
+print mb_strlen("\x80\xA1", "CP932") . "\n";
40
+// 0xFD, 0xFE, 0xFF is reserved.
41
+print mb_strlen("abc\xFD\xFE\xFF", 'CP932') . "\n";
42
+
43
echo "== MacJapanese ==\n";
44
print mb_strlen("\x80\xA1", 'MacJapanese') . "\n";
45
print mb_strlen("abc\xFD\xFE\xFF", 'MacJapanese') . "\n";
@@ -91,6 +96,9 @@ try {
91
96
-- Testing illegal bytes 0x80,0xFD-FF --
92
97
2
93
98
6
99
+== CP932 ==
100
+2
101
+5
94
102
== MacJapanese ==
95
103
104
0 commit comments