diff --git a/src/tools/uchardet.cpp b/src/tools/uchardet.cpp index d5ff167..3aa65da 100644 --- a/src/tools/uchardet.cpp +++ b/src/tools/uchardet.cpp @@ -190,7 +190,10 @@ int main(int argc, char ** argv) return 1; } *comma = '\0'; - uchardet_weigh_language(handle, lang_weight, strtof (comma + 1, NULL)); + if (strcmp (lang_weight, "*") == 0) + uchardet_set_default_weight(handle, strtof (comma + 1, NULL)); + else + uchardet_weigh_language(handle, lang_weight, strtof (comma + 1, NULL)); } while ((lang_weight = strtok_r (NULL, ",", &saveptr))); }