Troubleshooting
CSV import fails / shows mojibake
UTF-8 + consistent dates + reasonable row count + clean delimiters — four things for a clean import.
Symptom
You try to bring an external CSV into a Kition table and hit one of three classic failures: (1) clicking Import does nothing, (2) it succeeds but Chinese renders as 阿填浴, (3) date / number columns are detected as plain text.
Every problem falls into three buckets: encoding (90% are UTF-8 vs GBK / Windows-1252), structure (missing header, inconsistent delimiter, unbalanced quotes), size (more than 10K rows at once).
Checklist
- Encoding must be UTF-8 (macOS Numbers / Chinese Excel default to GBK or Windows-1252)
- First row is the header; field names must not contain
,or newlines - Dates as ISO 8601 (
YYYY-MM-DDorYYYY-MM-DD HH:MM:SS) - Cells containing
,must be quoted as"..."; internal"must be escaped as"" - Keep rows under 10K; split larger files into batches
- Do not mix
,and;as delimiters in one file
Step-by-step diagnostic
Spend 30 seconds inspecting the file before import — it prevents 90% of failures:
# Detect encoding (macOS / Linux ship with 'file')
file -I data.csv
# expect: text/csv; charset=utf-8
# If charset shows iso-8859-1, gbk, or unknown — convert it:
iconv -f GBK -t UTF-8 data.csv > data.utf8.csv
# or for Windows-1252:
iconv -f WINDOWS-1252 -t UTF-8 data.csv > data.utf8.csv
# Quick row count
wc -l data.csv
# Peek at line lengths to spot delimiter issues
awk -F',' '{print NF}' data.csv | sort | uniq -c
# every line should have the same field countFix
- Encoding:
iconv -f GBK -t UTF-8 in.csv > out.csv(see commands above) - In Excel, export as "CSV UTF-8 (Comma delimited) (.csv)", not plain "CSV"
- Date mess: in Excel, normalize the column format to
yyyy-mm-ddbefore export - Too large:
split -l 5000 data.csv chunk_to break it up - On step 2 of the import wizard, set each column type explicitly — do not trust auto-detection
Workaround
If import absolutely refuses, create an empty table, set field types by hand, then copy-paste rows from the CSV — Kition tables accept clipboard paste (Cmd/Ctrl + V) and map by header.
Backup plan: convert the CSV to JSON / NDJSON via Pandas, jq, or any script — Kition has "Import from JSON", which is far more tolerant of messy data.
When to file a bug
- UTF-8 + standard CSV + under 1000 rows still fails
- Import button does nothing and no new log lines appear — UI event never fires
- Dates strictly in ISO 8601 still detected as text
- Kition hangs or OOMs while importing chunked large files