File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,9 +131,11 @@ chardetect -l somefile.txt
131131
132132# Only consider specific encodings
133133chardetect -i utf-8,windows-1252 somefile.txt
134+ # somefile.txt: utf-8 with confidence 0.99
134135
135136# Pipe from stdin
136137cat somefile.txt | chardetect
138+ # stdin: utf-8 with confidence 0.99
137139```
138140
139141## What's New in 7.0
Original file line number Diff line number Diff line change @@ -365,9 +365,12 @@ chardet includes a ``chardetect`` command:
365365
366366 # Detect encoding of files
367367 chardetect somefile.txt anotherfile.csv
368+ # somefile.txt: utf-8 with confidence 0.99
369+ # anotherfile.csv: ascii with confidence 1.0
368370
369371 # Output only the encoding name
370372 chardetect --minimal somefile.txt
373+ # utf-8
371374
372375 # Include detected language
373376 chardetect -l somefile.txt
@@ -379,12 +382,16 @@ chardet includes a ``chardetect`` command:
379382
380383 # Specific encoding era
381384 chardetect -e dos somefile.txt
385+ # somefile.txt: cp850 with confidence 0.10
382386
383387 # Only consider specific encodings
384388 chardetect -i utf-8,windows-1252 somefile.txt
389+ # somefile.txt: utf-8 with confidence 0.99
385390
386391 # Exclude specific encodings
387392 chardetect -x cp037,cp500 somefile.txt
393+ # somefile.txt: utf-8 with confidence 0.99
388394
389395 # Read from stdin
390396 cat somefile.txt | chardetect
397+ # stdin: utf-8 with confidence 0.99
You can’t perform that action at this time.
0 commit comments