iconv: Converting from Windows ANSI to UTF-8 with BOM
You can add it manually by first echo
ing the bytes into the file:
echo -ne '\xEF\xBB\xBF' > names.utf8.csv
and then concatenating your required information at the end:
iconv -f CP1252 -t UTF-8 names.csv >> names.utf8.csv
Note the >>
rather than >
.
Note that "Windows ANSI" may not be CP1252 - that is configured by users.