Bug 127630 - iconv --verbose sends info to stdout rather than stderr
Summary: iconv --verbose sends info to stdout rather than stderr
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc   
(Show other bugs)
Version: 2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-07-11 16:30 UTC by Jesse Glick
Modified: 2007-11-30 22:10 UTC (History)
0 users

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: ---


Attachments (Terms of Use)

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.


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