Bug 127630

Summary: iconv --verbose sends info to stdout rather than stderr
Product: [Fedora] Fedora Reporter: Jesse Glick <typrase>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED UPSTREAM QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 2   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-30 08:55:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jesse Glick 2004-07-11 16:30:52 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Description of problem:
The iconv tool's man page states

       --verbose

       Print progress information.

Conventionally such information should be sent to standard error so it
is not accidentally included in the actual program output (which in
the case of a tool like iconv is usually sent to a file or direct
consumer). But iconv sends it to standard output, which essentially
causes it to corrupt the output.

Version-Release number of selected component (if applicable):
glibc-common-2.3.3-27

How reproducible:
Always


Steps to Reproduce:
$ cd /tmp
$ echo hello > file
$ iconv --verbose -f ISO-8859-1 -t UTF-8 file > file2
$ cat file2


Actual Results:

After iconv:

---%<---
---%<---

After cat:

---%<---
file:
hello
---%<---


Expected Results:

After iconv:

---%<---
file:
---%<---

After cat:

---%<---
hello
---%<---

Comment 1 Jesse Glick 2004-07-11 16:34:36 UTC
Note that

$ iconv --verbose -f ISO-8859-1 -t UTF-8 -o file2 file

works correctly. But it is conventional for command-line
file-processing tools on Unix to make all of the following equivalent:

$ TOOL -o OUTFILE INFILE
$ TOOL INFILE > OUTFILE
$ TOOL < INFILE > OUTFILE
$ TOOL - < INFILE > OUTFILE


Comment 2 Ulrich Drepper 2004-09-30 08:55:28 UTC
While your argumentation is flawed, I have made an appropriate change
since it might be useful.  The change will appear in rawhide soon.