Fri 05 Mar 2004 09:55:24 PM UTC, original submission:
Please see the two screenshots. The first was taken with
official synaptic 0.47 compiled against apt 0.5.21 (no rpm
support, only deb), the second is with the patch I attach.
These popup windows appear when I start synaptic but the
source mentioned in sources.list is not available.
The first screen has two major bugs that are fixed in the
second one. First, accents are displayed incorrectly.
The error message (No such file or directory in Hungarian)
is formatted in iso-8859-2 by glibc. The resulted screen
proves that is undergoes a locale->utf8 conversion twice
instead of only once. The second bug is that the beginning
and the end of the text is overwritten by some random
garbage.
Actually, it happens sometimes that I get a nearly empty
warning window and a pango warning to stderr about non-valid
utf8 text. So sometimes this random stuff is not even utf8.
Based on these facts my conclusion is: most likely somewhere
in the code (I haven't found it) utf8() is called on the
output of a previous utf8() call. This way the second time
it is called it free()s its current input (the result of
the previous call) before reading it.
I have LANG=hu_HU and no other LC_* variables.
Ps. The patch is only a quick workaround that just happens
to work in this particular case. I believe that this whole
design of static variables and non-reentrant functions is
bad, and will introduce other bugs in the future (or maybe
causes more bugs even now).
|