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 1db089c7f8
commit 4a891ec4ac

View File

@ -72,9 +72,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