com php-src: Fixed bug #62934: NEWS ext/mbstring/libmbfl/filter s/mbfilter_tl_jisx0201_jisx0208.c ext /mbstring/tests/bug62934.phpt

From: Date: Fri, 28 Jul 2017 11:02:25 +0000
Subject: com php-src: Fixed bug #62934: NEWS ext/mbstring/libmbfl/filter s/mbfilter_tl_jisx0201_jisx0208.c ext /mbstring/tests/bug62934.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-98845@lists.php.net to get a copy of this message
Commit: e3d25e78eb73c7b7bce0cd175578f7ce32741c5f Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 28 Jul 2017 13:02:25 +0200 Parents: b01336814d17544a4f16784d5bb041ae068486d6 Branches: PHP-7.0 PHP-7.1 PHP-7.2 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e3d25e78eb73c7b7bce0cd175578f7ce32741c5f Log: Fixed bug #62934 Bugs: https://bugs.php.net/62934 Changed paths: M NEWS M ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c A ext/mbstring/tests/bug62934.phpt Diff: diff --git a/NEWS b/NEWS index 2f1e2bc..239b107 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,8 @@ PHP NEWS - Mbstring: . Fixed bug #71606 (Segmentation fault mb_strcut with HTML-ENTITIES encoding). (cmb) + . Fixed bug #62934 (mb_convert_kana() does not convert iteration marks). + (Nikita) - MySQLi: . Fixed bug #74968 (PHP crashes when calling mysqli_result::fetch_object with diff --git a/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c b/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c index 4d075e5..637e690 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c @@ -222,11 +222,11 @@ mbfl_filt_tl_jisx0201_jisx0208(int c, mbfl_convert_filter *filt) } else if (mode & (MBFL_FILT_TL_ZEN2HAN_HIRA2KANA | MBFL_FILT_TL_ZEN2HAN_KANA2HIRA)) { if ((mode & MBFL_FILT_TL_ZEN2HAN_HIRA2KANA) && - c >= 0x3041 && c <= 0x3093) { + ((c >= 0x3041 && c <= 0x3093) || c == 0x309d || c == 0x309e)) { /* Zenkaku hirangana to Zenkaku katakana */ s = c + 0x60; } else if ((mode & MBFL_FILT_TL_ZEN2HAN_KANA2HIRA) && - c >= 0x30a1 && c <= 0x30f3) { + ((c >= 0x30a1 && c <= 0x30f3) || c == 0x30fd || c == 0x30fe)) { /* Zenkaku katakana to Zenkaku hirangana */ s = c - 0x60; } diff --git a/ext/mbstring/tests/bug62934.phpt b/ext/mbstring/tests/bug62934.phpt new file mode 100644 index 0000000..f3521a9 --- /dev/null +++ b/ext/mbstring/tests/bug62934.phpt @@ -0,0 +1,10 @@ +--TEST-- +Bug #62934: mb_convert_kana() does not convert iteration marks +--FILE-- +<?php +echo mb_convert_kana('あゝすゞめアヽスヾメ', 'C', 'UTF-8') . "\n"; +echo mb_convert_kana('あゝすゞめアヽスヾメ', 'c', 'UTF-8') . "\n"; +?> +--EXPECT-- +アヽスヾメアヽスヾメ +あゝすゞめあゝすゞめ

« previous php.cvs (#98845) next »