hirokawa Fri Nov 22 18:37:17 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mbstring mbfilter_kr.c Log: fixed some bugs in korean encoding conversion. Index: php4/ext/mbstring/mbfilter_kr.c diff -u php4/ext/mbstring/mbfilter_kr.c:1.4.4.1 php4/ext/mbstring/mbfilter_kr.c:1.4.4.2 --- php4/ext/mbstring/mbfilter_kr.c:1.4.4.1 Thu Nov 21 11:18:17 2002 +++ php4/ext/mbstring/mbfilter_kr.c Fri Nov 22 18:37:17 2002 @@ -20,7 +20,7 @@ * "streamable korean code filter and converter" */ -/* $Id: mbfilter_kr.c,v 1.4.4.1 2002/11/21 16:18:17 hirokawa Exp $ */ +/* $Id: mbfilter_kr.c,v 1.4.4.2 2002/11/22 23:37:17 hirokawa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -132,6 +132,8 @@ s = ucs_a3_uhc_table[c - ucs_a3_uhc_table_min]; } else if (c >= ucs_i_uhc_table_min && c < ucs_i_uhc_table_max) { s = ucs_i_uhc_table[c - ucs_i_uhc_table_min]; + } else if (c >= ucs_s_uhc_table_min && c < ucs_s_uhc_table_max) { + s = ucs_s_uhc_table[c - ucs_s_uhc_table_min]; } else if (c >= ucs_r1_uhc_table_min && c < ucs_r1_uhc_table_max) { s = ucs_r1_uhc_table[c - ucs_r1_uhc_table_min]; } else if (c >= ucs_r2_uhc_table_min && c < ucs_r2_uhc_table_max) { @@ -217,7 +219,7 @@ } if (flag > 0 && c > 0x20 && c < 0x7f) { if (flag == 1){ - w = (c1 - 0x21)*178 + (c - 0x21) + 0x54; + w = (c1 - 0x21)*190 + (c - 0x41) + 0x80; if (w >= 0 && w < uhc2_ucs_table_size) { w = uhc2_ucs_table[w]; } else { @@ -419,7 +421,7 @@ w = 0; } } else if ( c1 >= 0xa1 && c1 <= 0xc6 && flag > 0){ - w = (c1 - 0xa1)*178 + (c - ofst1[flag-1] + ofst2[flag-1]); + w = (c1 - 0xa1)*190 + (c - ofst1[flag-1] + ofst2[flag-1]); + if (w >= 0 && w < uhc2_ucs_table_size) { w = uhc2_ucs_table[w]; } else {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php