From: Moriyoshi Koizumi Date: Mon, 2 Feb 2009 04:53:10 +0000 (+0000) Subject: - MFH: Fix bug #46843 (CP936 euro symbol is not converted properly) X-Git-Tag: RELEASE_1_3_5~191 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aba813266ad7bcf7ee0d70fb97c2ca49c9c70de6;p=php - MFH: Fix bug #46843 (CP936 euro symbol is not converted properly) --- diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c index 9cdd0520e8..561dc3003b 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c @@ -192,7 +192,7 @@ mbfl_filt_conv_wchar_cp936(int c, mbfl_convert_filter *filter) } } if (s >= 0) { - if (s < 0x80) { /* latin */ + if (s <= 0x80) { /* latin */ CK((*filter->output_function)(s, filter->data)); } else { CK((*filter->output_function)((s >> 8) & 0xff, filter->data)); diff --git a/ext/mbstring/tests/bug46843.phpt b/ext/mbstring/tests/bug46843.phpt new file mode 100644 index 0000000000..136195cfe0 --- /dev/null +++ b/ext/mbstring/tests/bug46843.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #46843 (CP936 euro symbol is not converted properly) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +string(4) "20ac" +string(2) "80"