Navigation Menu

Skip to content

Commit

Permalink
UnicodeCIExceptKanaCIKanaWithVoicedSoundMark: fix a wrong type bug
Browse files Browse the repository at this point in the history
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!!!
  • Loading branch information
kou committed Feb 5, 2014
1 parent 153e287 commit 1507963
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion normalizers/mysql.c
Expand Up @@ -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++;
Expand Down
@@ -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": [

]
}
]
@@ -0,0 +1,4 @@
register normalizers/mysql

normalize NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark \
"a1!!あアア亜💕 " WITH_TYPES

0 comments on commit 1507963

Please sign in to comment.