zenity's text-info mistakes encoding from stdin

Bug #815869 reported by Serhiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zenity (Arch Linux)
New
Medium
zenity (Ubuntu)
Triaged
Low
Unassigned

Bug Description

It is reproducible with the following bash script:

mkfifo test
grep "аванс" /usr/share/dict/ukrainian > test &
cat test | zenity --text-info
grep "аванс" /usr/share/dict/ukrainian > test &
zenity --text-info --filename test
rm test

On the first time it outputs about 50 first lines with wrong encoding.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: zenity 2.32.1-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-10.46-generic 2.6.38.7
Uname: Linux 2.6.38-10-generic i686
Architecture: i386
Date: Mon Jul 25 15:47:17 2011
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
ProcEnviron:
 LANGUAGE=uk_UA:en
 PATH=(custom, user)
 LANG=uk_UA.UTF-8
 SHELL=/bin/bash
SourcePackage: zenity
UpgradeStatus: Upgraded to natty on 2011-07-21 (3 days ago)

Revision history for this message
Serhiy (xintx-ua) wrote :
Revision history for this message
Serhiy (xintx-ua) wrote :

Here is the reproducible code for those without /usr/share/dict/ukrainian :
for i in {1..342}; do echo "а" >> test2; done; cat test2 | zenity --text-info; rm test2

And when you reduce the number it detects right encoding:
for i in {1..341}; do echo "а" >> test2; done; cat test2 | zenity --text-info; rm test2

Revision history for this message
Serhiy (xintx-ua) wrote :

Yes, just what I thought:

$ for i in {1..341}; do echo "а" >> test2; done; wc -c test2; rm test2
1023 test2

$ for i in {1..342}; do echo "а" >> test2; done; wc -c test2; rm test2
1026 test2

It happens when the input exceeds 1024 bytes.

Revision history for this message
Serhiy (xintx-ua) wrote :

Workaround is to pipe it through
head -c 1023

Revision history for this message
Pedro Villavicencio (pedro) wrote :

This bug is an upstream one and it would be quite helpful if somebody experiencing it could send the bug the to the people writing the software. You can learn more about how to do this at https://wiki.ubuntu.com/Bugs/Upstream/GNOME . Thanks in advance!

Changed in zenity (Ubuntu):
importance: Undecided → Low
Revision history for this message
Serhiy (xintx-ua) wrote :

Thanks, I've reported it and added a watch.

Changed in zenity (Arch Linux):
importance: Unknown → Medium
status: Unknown → New
Changed in zenity (Ubuntu):
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.