src: uchardet tool now shows the language code in verbose mode.

This commit is contained in:
Jehan 2020-04-23 18:39:17 +02:00
parent dde09c7d08
commit ff6e4eee07

View File

@ -75,9 +75,15 @@ void detect(FILE *fp,
printf("\n");
for (i = 0; i < candidates; i++)
{
printf("\t%s (%f)\n",
uchardet_get_encoding(handle, i),
uchardet_get_confidence(handle, i));
if (uchardet_get_language(handle, i))
printf("\t%s / %s (%f)\n",
uchardet_get_encoding(handle, i),
uchardet_get_language(handle, i),
uchardet_get_confidence(handle, i));
else
printf("\t%s (%f)\n",
uchardet_get_encoding(handle, i),
uchardet_get_confidence(handle, i));
}
}
else