[Groonga-commit] groonga/groonga [master] ignore encoding case.

Back to archive index

null+****@clear***** null+****@clear*****
2010年 8月 24日 (火) 10:13:50 JST


Kouhei Sutou	2010-08-24 01:13:50 +0000 (Tue, 24 Aug 2010)

  New Revision: fd6a596f5241df5cef736d978480b8d5f840fb1f

  Log:
    ignore encoding case.

  Modified files:
    modules/tokenizers/mecab.c

  Modified: modules/tokenizers/mecab.c (+3 -3)
===================================================================
--- modules/tokenizers/mecab.c    2010-08-24 01:10:34 +0000 (d8ed71c)
+++ modules/tokenizers/mecab.c    2010-08-24 01:13:50 +0000 (1d8cbf8)
@@ -175,13 +175,13 @@ check_mecab_dictionary_encoding(grn_ctx *ctx)
     for (; dictionary; dictionary = dictionary->next) {
       switch (encoding) {
       case GRN_ENC_EUC_JP:
-        if (strcmp(dictionary->charset, "EUC-JP") == 0) {
+        if (strcasecmp(dictionary->charset, "euc-jp") == 0) {
           have_same_encoding_dictionary = 1;
         }
         break;
       case GRN_ENC_UTF8:
-        if (strcmp(dictionary->charset, "UTF-8") == 0 ||
-            strcmp(dictionary->charset, "utf8") == 0) {
+        if (strcasecmp(dictionary->charset, "utf-8") == 0 ||
+            strcasecmp(dictionary->charset, "utf8") == 0) {
           have_same_encoding_dictionary = 1;
         }
         break;




Groonga-commit メーリングリストの案内
Back to archive index