Bug 127630 - iconv --verbose sends info to stdout rather than stderr
iconv --verbose sends info to stdout rather than stderr
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
2
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-07-11 12:30 EDT by Jesse Glick
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-30 04:55:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jesse Glick 2004-07-11 12:30:52 EDT
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 12:34:36 EDT
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 04:55:28 EDT
While your argumentation is flawed, I have made an appropriate change
since it might be useful.  The change will appear in rawhide soon.

Note You need to log in before you can comment on or make changes to this bug.