diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2017-07-28 13:02:25 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2017-07-28 13:02:25 +0200 |
commit | e3d25e78eb73c7b7bce0cd175578f7ce32741c5f (patch) | |
tree | 46aed93d80ff9f482c6567b65410ac9614eda02f | |
parent | b01336814d17544a4f16784d5bb041ae068486d6 (diff) | |
download | php-git-e3d25e78eb73c7b7bce0cd175578f7ce32741c5f.tar.gz |
Fixed bug #62934
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c | 4 | ||||
-rw-r--r-- | ext/mbstring/tests/bug62934.phpt | 10 |
3 files changed, 14 insertions, 2 deletions
@@ -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 4d075e51d4..637e69074c 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 0000000000..f3521a97c6 --- /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-- +アヽスヾメアヽスヾメ +あゝすゞめあゝすゞめ |