Encoding and Line Endings
Harry
· 13 Sep 2026
· 1 views
Encoding Basics
Files carry an encoding: UTF-8 (with or without BOM), UTF-16, or legacy ANSI code pages. The status bar shows the current encoding, and the Encoding menu lets you change it.
Convert vs Sheet with Encoding
"Convert to UTF-8" rewrites the file content; "Encode in UTF-8" only reinterprets it without changing bytes. For stubborn legacy files, first try Encode, then Convert.
Line Endings
Windows uses CRLF, Linux/macOS use LF. Edit > EOL Conversion converts between them, critical before committing scripts into a Git repository. Auto-detect comes on by default so mixed files open cleanly.
Detecting Corruption
Garbage characters, boxes or mojibake mean the encoding or EOL is wrong. Switch encoding and check the first few special characters, especially in CSV and property files.
Key Points
- UTF-8 is the modern default; avoid BOM where possible.
- EOL conversion keeps cross-platform files clean.
- Misread encodings show as mojibake.
- Convert vs Encode change bytes differently.