Kouhei Sutou
null+****@clear*****
Wed Feb 5 22:28:28 JST 2014
Kouhei Sutou 2014-02-05 22:28:28 +0900 (Wed, 05 Feb 2014) New Revision: 150796315eac73bf4e259df6d3b6bf3d4fd3fcd3 https://github.com/groonga/groonga-normalizer-mysql/commit/150796315eac73bf4e259df6d3b6bf3d4fd3fcd3 Message: UnicodeCIExceptKanaCIKanaWithVoicedSoundMark: fix a wrong type bug This bug is caused when a fullwidth character is normalized to a halfwidth character. [groonga-dev,02108] Reported by yoku. Thanks!!! [groonga-dev,02110] Fixed by Naoya Murakami. Thanks!!! Added files: test/suite/unicode_ci_except_kana_ci_kana_with_voiced_sound_mark/with_types.expected test/suite/unicode_ci_except_kana_ci_kana_with_voiced_sound_mark/with_types.test Modified files: normalizers/mysql.c Modified: normalizers/mysql.c (+1 -1) =================================================================== --- normalizers/mysql.c 2014-02-05 22:23:59 +0900 (2988721) +++ normalizers/mysql.c 2014-02-05 22:28:28 +0900 (db0d000) @@ -369,7 +369,7 @@ normalize(grn_ctx *ctx, grn_obj *string, if (current_type) { char *current_normalized; current_normalized = - normalized + normalized_length_in_bytes - character_length; + normalized + normalized_length_in_bytes - normalized_character_length; current_type[0] = grn_nfkc_char_type((unsigned char *)current_normalized); current_type++; Added: test/suite/unicode_ci_except_kana_ci_kana_with_voiced_sound_mark/with_types.expected (+28 -0) 100644 =================================================================== --- /dev/null +++ test/suite/unicode_ci_except_kana_ci_kana_with_voiced_sound_mark/with_types.expected 2014-02-05 22:28:28 +0900 (cfd76cf) @@ -0,0 +1,28 @@ +register normalizers/mysql +[[0,0.0,0.0],true] +normalize NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark "a1!!あアア亜💕 " WITH_TYPES +[ + [ + 0, + 0.0, + 0.0 + ], + { + "normalized": "A1!!あああ亜💕 ", + "types": [ + "alpha", + "digit", + "symbol", + "symbol", + "hiragana", + "hiragana", + "hiragana", + "kanji", + "others", + "others" + ], + "checks": [ + + ] + } +] Added: test/suite/unicode_ci_except_kana_ci_kana_with_voiced_sound_mark/with_types.test (+4 -0) 100644 =================================================================== --- /dev/null +++ test/suite/unicode_ci_except_kana_ci_kana_with_voiced_sound_mark/with_types.test 2014-02-05 22:28:28 +0900 (4dd7dc3) @@ -0,0 +1,4 @@ +register normalizers/mysql + +normalize NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark \ + "a1!!あアア亜💕 " WITH_TYPES -------------- next part -------------- HTML����������������������������...Download