ICONV adds extra line ending to it's output
Closed this issue · 1 comments
aleaksunder commented
If we try to convert a string with ICONV utility and send it's output to file then the resulting file will contain additional line ending ( CR + LF symbols.
echo -n -- Hello! > C:\temp\file.txt
will produce this output in hex:
48 65 6C 6C 6F 21
and
echo -n -- Hello! | iconv -i utf8 -e utf16 > C:\temp\file.txt
will produce this output in hex:
48 00 65 00 6C 00 6C 00 6F 00 21 00 0D 00 0A 00
as you can see there is additional 0D 00 0A 00
values in last 4 bytes
aleaksunder commented
Nice! Thanks!