This bug concerns the "iconv" utility. It's not really a bug, but bad design. I did: iconv --from-code==LATIN1 --to-code=UTF-8 --output=file_to_convert.xml output_file.xml where mistakingly I had put my original file, file_to_convert.xml, as output file. And for source file I had specified mistakingly some output filename which doesn't exist. So iconv displayed that "output_file.xml" doesn't exist, that it can't read from it, but replaced my original file (file_to_convert.xml) with an empty 0-byte file. But it's stupid that it would put an empty file (and thus destroy all my data) when there was nothing to convert in the first place. To sum it up, don't create an output file when there isn't an input file.
In libc/iconv/iconv_prog.c the output_file is fopen'ed prior to processing any of the files specified on the command line. Perhaps a lazy fopen() of the output_file can take place when an actual fopen(argv[remaining]) succeeds. I'll investigate.
I checked in a patch to the trunk.