Use this when CSV files use unexpected separators.
Delimiters
CSV delimiters separate fields, normally a comma, but semicolons are common in European Excel exports and tabs in TSV. Fields containing the delimiter must be quoted.
1. Delimiters: comma, semicolon (EU Excel), tab.
2. Specify explicitly.
3. Quote fields containing delimiters.
4. Line endings (CRLF).
5. Document the format.
text → delimiter → fields
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as encoding/BOM issues, delimiter/quoting ambiguity, duplicate keys, namespace drift, scalar coercion, invalid schema assumptions and parser success without consumer-valid semantics, choosing the cases most relevant to delimiter selection, quoting/escaping interaction, embedded delimiter/newline cases and parser dialect agreement.
Step 2 Common mistakes Narrow the fault
- Assuming commas for Excel exports with
;.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Delimiters may be comma, semicolon or tab.
- European Excel exports often use semicolons.
- Fields containing the delimiter must be quoted.
head -1 file.csv | cat -A— see delimiters/line endingspython3 -c 'import csv;print(csv.Sniffer().sniff(open("f.csv").read(2048)).delimiter)'— detect delimiter- Locale (semicolon in DK/EU Excel) — regional
ReferenceWhy it matters1 section · depth on demand
What it is
The delimiter separates fields: comma, semicolon (common in Danish/European Excel exports) or tab. Quote fields that contain the delimiter.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
The delimiter separates fields in a CSV file. Comma is the default, but semicolon is common in European locales (where comma is the decimal separator), and tabs are used in TSV files. Fields containing the delimiter, quotes or line breaks must be quoted.
import csv
with open("export.csv", newline="", encoding="utf-8-sig") as f:
dialect = csv.Sniffer().sniff(f.read(2048)); f.seek(0)
rows = list(csv.DictReader(f, dialect=dialect))
Import-Csv users.csv -Delimiter ';'
Export-Csv out.csv -Delimiter ';' -NoTypeInformation -Encoding utf8
Never split lines on commas manually — quoted fields such as "Oslo, floor 2" break naive parsing.
Mechanics
The linked authority for bounded mechanics is RFC 4180 — Common Format and MIME Type for CSV Files; documentation support is separate from observed lab/production Evidence.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in CSV > Delimiters. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc4180 · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For delimiter selection, quoting/escaping interaction, embedded delimiter/newline cases and parser dialect agreement, prefer typed fields and stable IDs over human presentation text.