iconv stdio buffering
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eglibc (Ubuntu) |
Triaged
|
Low
|
Unassigned | ||
glibc (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
Tool "iconv" suffers from the stdio buffering problem described here:
https:/
Basically, when piping to iconv in an interactive session, output stutters. Tool "stdbuf" does not help. From the page above: "But it looks like iconv is managing the buffering internally itself - it's nothing to do with the Linux pipe buffer."
Solutions are described in this page:
http://
iconv should have a command-line switch to help. From the page above:
"Note tail's stdout buffer would also have this problem, but tail -f calls fflush
on the stdout stream when new data is received to alleviate this
(as do tcpdump -l, grep --line-buffered and sed --unbuffered for example)."
[known workaround]
Use `recode` instead.
Changed in glibc (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Low |
This bug was reported more than 15 years ago. https:/ /sourceware. org/bugzilla/ show_bug. cgi?id= 6050 /sourceware. org/legacy- ml/libc- alpha/2015- 08/msg00297. html
But there is a patch for it since 2015 https:/
Who maintains libc-bin? Could you please apply these patches?
$ iconv -V
iconv (Ubuntu GLIBC 2.31-0ubuntu9.14) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Ulrich Drepper.
$ apt-cache policy libc-bin
libc-bin:
Installed: 2.31-0ubuntu9.14
Candidate: 2.31-0ubuntu9.14