±encoding, ±e
File encoding of the input or output CSV file
Description
Set the assumed encoding for reading a CSV file.
Set the encoding for writing a CSV file.
The encoding name can be given uppercase or lowercase.
Moreover, there are some aliases for convenience. UTF-8 , UTF-16 , and UTF-32 can also be written as UTF8 , UTF16 , and UTF32 .
UTF16 and UTF-16LE are synonyms, as well as UTF-32 and UTF-32LE .
Alternatively a codepage can be denoted, prepended with a 'CP-' (like
All available encodings can be displayed using the following command:
About UTF-8 encoding and the BOM (Byte Order Mark)
For general UTF-8-encoded files, If UTF-8 with BOM is needed (e.g., for easier import into a certain spreadsheet software), either
Pattern
±e=encoding
±encoding=encoding
Usage Examples
- csvfox infile.csv +e=UTF-8 (...)
- Assumes that the CSV file to read has UTF-8 encoding.
- csvfox infile.csv -e=Windows-1252 outfile.csv
- Reads infile.csv (in default encoding) and writes it into outfile.csv, using Windows-1252 encoding for writing.