Skip to content

Commit 887584b

Browse files
committed
call uchardet_get_confidence
1 parent f1e11d6 commit 887584b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/uchardet.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ void detect(FILE * fp)
6666
uchardet_data_end(handle);
6767

6868
const char * charset = uchardet_get_charset(handle);
69+
float confidence = uchardet_get_confidence(handle);
6970
if (*charset)
70-
printf("%s\n", charset);
71+
printf("{ encoding=%s, confidence=%f }\n", charset, confidence);
7172
else
7273
printf("unknown\n");
7374

0 commit comments

Comments
 (0)