From: Xinchen Hui Date: Fri, 18 Nov 2011 08:50:29 +0000 (+0000) Subject: Fixed bug #60306 (Characters lost while converting from cp936 to utf8) X-Git-Tag: php-5.4.0RC2~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5008390304e616c59ff8151605b58d03d163ff62;p=php Fixed bug #60306 (Characters lost while converting from cp936 to utf8) --- diff --git a/NEWS b/NEWS index ef552e452d..1ec9aca03a 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,10 @@ PHP NEWS . Fixed bug #54682 (Tidy::diagnose() NULL pointer dereference). (Maksymilian Arciemowicz, Felipe) +- Mbstring + . Fixed bug #60306 (Characters lost while converting from cp936 to utf8). + (Laruence) + -CLI SAPI: . Fixed bug #60159 (Router returns false, but POST is not passed to requested resource). (Laruence) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c index a3baeabdfc..caf26e329b 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c @@ -103,7 +103,7 @@ int mbfl_filt_conv_cp936_wchar(int c, mbfl_convert_filter *filter) { int k; - int c1, c2, w; + int c1, c2, w = -1; switch (filter->status) { case 0: @@ -304,5 +304,3 @@ static int mbfl_filt_ident_cp936(int c, mbfl_identify_filter *filter) return c; } - - diff --git a/ext/mbstring/tests/bug60306.phpt b/ext/mbstring/tests/bug60306.phpt new file mode 100644 index 0000000000..f7969e1952 --- /dev/null +++ b/ext/mbstring/tests/bug60306.phpt @@ -0,0 +1,11 @@ +--TEST-- +Bug #60306 (Characters lost while converting from cp936 to utf8) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true)