How to handle garbled characters when importing test data?
On Windows, Excel will automatically save CSV files using GBK encoding by default. This can cause garbled characters when viewing the CSV in other software. Also, old Excel versions (e.g. Excel 2016) typically won't save the BOM (byte order mark) when saving CSV as UTF-8, which can also lead to garbled characters.
Solutions:
- On Windows, resave the CSV as
UTF-8
encoding. - On macOS, run
iconv -f GBK -t UTF-8 xxx.csv > utf-8.csv
to convert encoding.