Bug 22461

Summary: breaks when displaying filenames in the GUI (in ru_RU.KOI8-R)
Product: Sisyphus Reporter: Ivan Zakharyaschev <imz>
Component: fslintAssignee: Ivan Zakharyaschev <imz>
Status: CLOSED WORKSFORME QA Contact: qa-sisyphus
Severity: major    
Priority: P3 CC: antohami, cas, cow, darktemplar, enp, evg, george, grenka, lav, mithraen, nbr, obirvalger, qa_viy, rider, sem, shaba, sin, slev, vitty, viy
Version: unstable   
Hardware: all   
OS: Linux   

Description Ivan Zakharyaschev 2009-12-06 21:25:23 MSK
fslint-2.40-alt1
libpango-1.24.5-alt1
$ rpm -qa '*pygtk*'
python-module-pygtk-libglade-2.16.0-alt3
python-module-pygtk-2.16.0-alt3
python-module-pygtkimageview-1.1.0-alt1
python-module-pygtksourceview-2.0.0-alt2.1
$ 

If I run fslint (under ru_RU.KOI8-R locale), it breaks when displaying filenames.

How to reproduce:

$ mkdir fslint
$ cd fslint/
$ echo a > a 
$ echo a > a.cp
$ locale
LANG=ru_RU.KOI8-R
LC_CTYPE="ru_RU.KOI8-R"
LC_NUMERIC="ru_RU.KOI8-R"
LC_TIME="ru_RU.KOI8-R"
LC_COLLATE="ru_RU.KOI8-R"
LC_MONETARY="ru_RU.KOI8-R"
LC_MESSAGES=POSIX
LC_PAPER="ru_RU.KOI8-R"
LC_NAME="ru_RU.KOI8-R"
LC_ADDRESS="ru_RU.KOI8-R"
LC_TELEPHONE="ru_RU.KOI8-R"
LC_MEASUREMENT="ru_RU.KOI8-R"
LC_IDENTIFICATION="ru_RU.KOI8-R"
LC_ALL=
$ fslint-gui ./ 
/usr/bin/fslint-gui:1282: PangoWarning: Invalid UTF-8 string passed to pango_layout_set_text()
  clist.columns_autosize()
/usr/bin/fslint-gui:1283: PangoWarning: Invalid UTF-8 string passed to pango_layout_set_text()
  clist.thaw()
/usr/bin/fslint-gui:1943: PangoWarning: Invalid UTF-8 string passed to pango_layout_set_text()
  gtk.main ()

What I do in the GUI is pressing "Find" (it means find duplicates). After working (examining the FS), it tries to display the results and breaks; it prints the following error message in the area in the lower part of the GUI:

<type 'exceptions.UnicodeDecodeError'>: 'utf8' codec can't decode byte 0x9a in position 2: unexpected code byte

At the same time, in the "Name" column, I see smth that looks like "2 x 2", and in the "Directory" column smth that looks like "4X096" ("X" is framed), and in the "Date" column the string "bytes wasted".

Expected:

If I run it like this:

$ LC_ALL=C fslint-gui ./ 

then there are no exception, and the 2 filenames appear in the output in addition to the first line (described above).

More info:

$ /usr/share/fslint/fslint/findup ./      
a
a.cp
$
Comment 1 Slava Dubrovskiy 2010-01-04 04:20:56 MSK
Не могу воспроизвести.
$ rpm -qa '*pygtk*'
python-module-pygtk-libglade-2.17.0-alt1
python-module-pygtk-2.17.0-alt1

libpango-1.26.2-alt1

Может обновление исправило проблему или то, что у меня utf8 влияет. Но и в C тоже работает все.
Comment 2 Vitaly Lipatov 2010-01-05 04:21:02 MSK
Поскольку проблема именно при KOI8-R, конечно в UTF-8 не воспроизвести.