Navigation Menu

Skip to content

Commit

Permalink
TokenMecab windows: MeCab requires UTF-8 for rcfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jun 23, 2018
1 parent 7dd82ae commit 761af2d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/tokenizers/mecab.c
Expand Up @@ -289,10 +289,17 @@ mecab_create(grn_ctx *ctx)
# ifdef WIN32
{
static char windows_mecab_rc_file[PATH_MAX];
const char *utf8_base_dir;

utf8_base_dir =
grn_encoding_convert_to_utf8_from_locale(ctx,
grn_plugin_windows_base_dir(),
-1,
NULL);
grn_strcpy(windows_mecab_rc_file,
PATH_MAX,
grn_plugin_windows_base_dir());
utf8_base_dir);
grn_encoding_converted_free(ctx, utf8_base_dir);
grn_strcat(windows_mecab_rc_file,
PATH_MAX,
"/");
Expand Down

0 comments on commit 761af2d

Please sign in to comment.