常见错误速览Quick Error Overview
90% 的 CSV 问题集中在五类:乱码、列错位、引号未转义、行尾符差异、缺少编码声明。下面逐一排查。
90% of CSV problems fall into five buckets: garbled text, shifted columns, unescaped quotes, line-ending differences, and missing encoding. Let's go through them.
1. 乱码(编码问题)1. Garbled Text (Encoding)
中文显示成 涓栫晫 一类乱码,通常是 UTF-8 文件被当成 GBK(或反之)打开。解决:用支持编码选择的编辑器/导入向导以正确编码打开,或在 365Lab 编码转换 中把文件转成 UTF-8(详见 CSV 乱码修复)。
Chinese shows as 涓栫晫-style garbage when a UTF-8 file is opened as GBK (or vice versa). Fix: open with an editor/wizard that lets you pick encoding, or convert to UTF-8 with the 365Lab encoder (see garbled-text fix).
2. 列错位(分隔符 / 引号)2. Shifted Columns (Delimiter / Quotes)
某一行突然多出一列,多半是字段里包含未处理的逗号或换行。标准做法是用双引号把该字段包起来(见 分隔符与引号)。欧洲常用的分号分隔文件在英文环境也会错位,需确认分隔符。
A row suddenly gains a column — usually a field contains an unhandled comma or newline. Wrap that field in double quotes (see delimiters & quoting). Semicolon-delimited files common in Europe also shift in English locales; confirm the delimiter.
3. 引号未转义3. Unescaped Quotes
字段里本身有双引号时,必须写成两个双引号 "" 来转义,否则解析器会提前结束该字段。例如:"他说""你好"""。
When a field contains a double quote, escape it as two double quotes "", or the parser ends the field early. Example: "He said ""hi""".
4. 行尾符差异(CRLF / LF)4. Line-Ending Differences (CRLF / LF)
Windows 用 CRLF,macOS/Linux 用 LF。跨平台传输后,有些老程序会把一整段当成一行。统一换行符通常能解决"记录数不对"的问题。
Windows uses CRLF, macOS/Linux use LF. After cross-platform transfer, some old tools read a whole block as one line. Normalizing line endings fixes "wrong record count".
5. 缺少编码声明(BOM)5. Missing Encoding Declaration (BOM)
部分 Windows 程序(如旧版 Excel)只认带 UTF-8 BOM 的文件,否则首列乱码。若你的文件没 BOM 又打不开,可加上 BOM 再试。
Some Windows programs (e.g. old Excel) only read files with a UTF-8 BOM, else the first column garbles. If your BOM-less file won't open, add a BOM and retry.
用工具快速定位Locate Issues Fast
与其肉眼翻几千行,不如用 365Lab 解析预览 直接看到每一列如何被切分,错位、引号、编码问题一眼可见;再用清洗与编码模块批量修正。
Instead of eyeballing thousands of rows, use the 365Lab parse preview to see exactly how each column is split — shifts, quotes and encoding issues pop out — then batch-fix with the cleaning and encoding modules.
文件打不开或错位?打开在线解析工具,上传即可预览每一列,快速定位并修复问题,全程本地处理。
File won't open or shifts? Open the parser, upload to preview every column, locate and fix fast — all local.