Skip to content

Commit a98f097

Browse files
dan-blanchardclaude
andcommitted
docs: add example output to all CLI commands for consistency
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d2f4ac2 commit a98f097

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,11 @@ chardetect -l somefile.txt
131131

132132
# Only consider specific encodings
133133
chardetect -i utf-8,windows-1252 somefile.txt
134+
# somefile.txt: utf-8 with confidence 0.99
134135

135136
# Pipe from stdin
136137
cat somefile.txt | chardetect
138+
# stdin: utf-8 with confidence 0.99
137139
```
138140

139141
## What's New in 7.0

docs/usage.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)