diff options
author | Alex Dowad <alexinbeijing@gmail.com> | 2021-01-05 15:30:36 +0200 |
---|---|---|
committer | Alex Dowad <alexinbeijing@gmail.com> | 2021-01-15 08:30:30 +0200 |
commit | a50607d11dcab7ea28c836e48af6f1f0e0819c08 (patch) | |
tree | 0f0a03bc0f6f7190e4fd4365c38a685424f02e8c | |
parent | 5e5243ab650ceeff3febdeeee39373174acd8387 (diff) | |
download | php-git-a50607d11dcab7ea28c836e48af6f1f0e0819c08.tar.gz |
CP5022{0,1,2}: use JISX0201 for U+203E (overline)
Same issue as d497c0e96f addressed for JIS7/JIS8, but for CP5022{0,1,2} this time.
-rw-r--r-- | ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c index 41698a4ece..70399fa79c 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c @@ -587,13 +587,14 @@ mbfl_filt_conv_wchar_cp50220raw(int c, mbfl_convert_filter *filter) /* * wchar => CP50221 */ -int -mbfl_filt_conv_wchar_cp50221(int c, mbfl_convert_filter *filter) +int mbfl_filt_conv_wchar_cp50221(int c, mbfl_convert_filter *filter) { int s = 0; if (c >= ucs_a1_jis_table_min && c < ucs_a1_jis_table_max) { s = ucs_a1_jis_table[c - ucs_a1_jis_table_min]; + } else if (c == 0x203E) { /* OVERLINE */ + s = 0x1007E; /* Convert to JISX 0201 OVERLINE */ } else if (c >= ucs_a2_jis_table_min && c < ucs_a2_jis_table_max) { s = ucs_a2_jis_table[c - ucs_a2_jis_table_min]; } else if (c >= ucs_i_jis_table_min && c < ucs_i_jis_table_max) { @@ -609,8 +610,6 @@ mbfl_filt_conv_wchar_cp50221(int c, mbfl_convert_filter *filter) if (s <= 0) { if (c == 0xa5) { /* YEN SIGN */ s = 0x1005c; - } else if (c == 0x203e) { /* OVER LINE */ - s = 0x1007e; } else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ s = 0x2140; } else if (c == 0x2225) { /* PARALLEL TO */ @@ -730,15 +729,14 @@ mbfl_filt_conv_wchar_cp50221(int c, mbfl_convert_filter *filter) /* * wchar => CP50222 */ -int -mbfl_filt_conv_wchar_cp50222(int c, mbfl_convert_filter *filter) +int mbfl_filt_conv_wchar_cp50222(int c, mbfl_convert_filter *filter) { - int s; - - s = 0; + int s = 0; if (c >= ucs_a1_jis_table_min && c < ucs_a1_jis_table_max) { s = ucs_a1_jis_table[c - ucs_a1_jis_table_min]; + } else if (c == 0x203E) { /* OVERLINE */ + s = 0x1007E; /* Convert to JISX 0201 OVERLINE */ } else if (c >= ucs_a2_jis_table_min && c < ucs_a2_jis_table_max) { s = ucs_a2_jis_table[c - ucs_a2_jis_table_min]; } else if (c >= ucs_i_jis_table_min && c < ucs_i_jis_table_max) { @@ -754,8 +752,6 @@ mbfl_filt_conv_wchar_cp50222(int c, mbfl_convert_filter *filter) if (s <= 0) { if (c == 0xa5) { /* YEN SIGN */ s = 0x1005c; - } else if (c == 0x203e) { /* OVER LINE */ - s = 0x1007e; } else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ s = 0x2140; } else if (c == 0x2225) { /* PARALLEL TO */ |