Edge Cases · 17 files
Sample Text Encodings
CSV and text files in UTF-8 with BOM, UTF-16, Latin-1, Windows-1252, Shift_JIS and GB18030; CRLF, CR-only and mixed line endings; semicolon delimiters; tricky quoted fields; a Unicode stress test; NUL bytes and a 1 MB single line.
All 17 text encodings files
Download all with curl
# 17 files, 1 MB in total
while read -r url; do curl -LO --fail "$url"; done <<'EOF'
https://files.samplefiles.com/edge-cases/encoding/null-bytes.txt
https://files.samplefiles.com/edge-cases/encoding/gb18030.csv
https://files.samplefiles.com/edge-cases/encoding/shift-jis.csv
https://files.samplefiles.com/edge-cases/encoding/quoted-fields.csv
https://files.samplefiles.com/edge-cases/encoding/unicode-stress.txt
https://files.samplefiles.com/edge-cases/encoding/no-header.csv
https://files.samplefiles.com/edge-cases/encoding/latin1.csv
https://files.samplefiles.com/edge-cases/encoding/cr-only.csv
https://files.samplefiles.com/edge-cases/encoding/semicolon.csv
https://files.samplefiles.com/edge-cases/encoding/utf8-bom.csv
https://files.samplefiles.com/edge-cases/encoding/mixed-line-endings.csv
https://files.samplefiles.com/edge-cases/encoding/crlf.csv
https://files.samplefiles.com/edge-cases/encoding/windows-1252.csv
https://files.samplefiles.com/edge-cases/encoding/utf32.txt
https://files.samplefiles.com/edge-cases/encoding/utf16le.csv
https://files.samplefiles.com/edge-cases/encoding/utf16be.csv
https://files.samplefiles.com/edge-cases/encoding/long-line.txt
EOF| File | Size | Details | Download |
|---|---|---|---|
| Text with NUL bytesnull-bytes.txt | 44 B | Download | |
| CSV, GB18030 (Chinese)gb18030.csv | 49 B | Download | |
| CSV, Shift_JIS (Japanese)shift-jis.csv | 61 B | Download | |
| CSV with tricky quoted fieldsquoted-fields.csv | 329 B | Download | |
| Unicode stress testunicode-stress.txt | 440 B | Download | |
| CSV without a header rowno-header.csv | 947 B | Download | |
| CSV, ISO-8859-1 (Latin-1)latin1.csv | 974 B | Download | |
| CSV with CR-only line endingscr-only.csv | 984 B | Download | |
| CSV with semicolon delimitersemicolon.csv | 984 B | Download | |
| CSV, UTF-8 with BOMutf8-bom.csv | 987 B | Download | |
| CSV with mixed line endingsmixed-line-endings.csv | 992 B | Download | |
| CSV with CRLF line endingscrlf.csv | 1008 B | Download | |
| CSV, Windows-1252windows-1252.csv | 1014 B | Download | |
| Text file, UTF-32 with BOMutf32.txt | 1.1 KB | Download | |
| CSV, UTF-16 LE with BOMutf16le.csv | 1.9 KB | Download | |
| CSV, UTF-16 BE with BOMutf16be.csv | 1.9 KB | Download | |
| 1 MB single-line text filelong-line.txt | 1 MB | Download |
FAQ
Why does my CSV show a strange first column name?
A UTF-8 BOM (EF BB BF) at the start of the file is being read as part of the first header. Try utf8-bom.csv to reproduce it.