Hi I am trying to convert some log files from a Microsoft SQL server, but the files are encoded using UTf-16LE and iconv does not seem to be able to convert them.
I
The command you specified will output to stdout. You can either use the -o
parameter, or redirect your output:
with -o
:
iconv -f UTF-16LE -t UTF-8 infile -o outfile
with piping:
iconv -f UTF-16LE -t UTF-8 infile > outfile
Both will yield the desired result.
However some versions of iconv (v1 on macOS for example) do not support the -o
parameter and you will see that the converted text is echoed to stdout. In that case, use the piping option.
I forgot the -o
switch!
The final command is :
iconv -f UTF-16LE -t UTF-8 <filename> -o <new-filename>