Skip to content

Commit e3d25e7

Browse files
committed
Fixed bug #62934
1 parent b013368 commit e3d25e7

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ PHP NEWS
1616
- Mbstring:
1717
. Fixed bug #71606 (Segmentation fault mb_strcut with HTML-ENTITIES encoding).
1818
(cmb)
19+
. Fixed bug #62934 (mb_convert_kana() does not convert iteration marks).
20+
(Nikita)
1921

2022
- MySQLi:
2123
. Fixed bug #74968 (PHP crashes when calling mysqli_result::fetch_object with

ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,11 @@ mbfl_filt_tl_jisx0201_jisx0208(int c, mbfl_convert_filter *filt)
222222
} else if (mode & (MBFL_FILT_TL_ZEN2HAN_HIRA2KANA
223223
| MBFL_FILT_TL_ZEN2HAN_KANA2HIRA)) {
224224
if ((mode & MBFL_FILT_TL_ZEN2HAN_HIRA2KANA) &&
225-
c >= 0x3041 && c <= 0x3093) {
225+
((c >= 0x3041 && c <= 0x3093) || c == 0x309d || c == 0x309e)) {
226226
/* Zenkaku hirangana to Zenkaku katakana */
227227
s = c + 0x60;
228228
} else if ((mode & MBFL_FILT_TL_ZEN2HAN_KANA2HIRA) &&
229-
c >= 0x30a1 && c <= 0x30f3) {
229+
((c >= 0x30a1 && c <= 0x30f3) || c == 0x30fd || c == 0x30fe)) {
230230
/* Zenkaku katakana to Zenkaku hirangana */
231231
s = c - 0x60;
232232
}

ext/mbstring/tests/bug62934.phpt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--TEST--
2+
Bug #62934: mb_convert_kana() does not convert iteration marks
3+
--FILE--
4+
<?php
5+
echo mb_convert_kana('あゝすゞめアヽスヾメ', 'C', 'UTF-8') . "\n";
6+
echo mb_convert_kana('あゝすゞめアヽスヾメ', 'c', 'UTF-8') . "\n";
7+
?>
8+
--EXPECT--
9+
アヽスヾメアヽスヾメ
10+
あゝすゞめあゝすゞめ

0 commit comments

Comments
 (0)