[PyKDE] eric3 VariableViewer crashes on non-utf8 strings
Detlev Offenbach
detlev at die-offenbachs.de
Wed Oct 13 19:27:58 BST 2004
Hi,
thanks for your report. A fix for this will be in the next 3.5 bug fix release
and in the next snapshot of the 3.6 development.
Detlev
Am Mittwoch, 13. Oktober 2004 15:07 schrieb Krystof Zacek:
> This is caused by file
>
> /usr/lib/python2.3/site-packages/eric/Debugger/VariablesViewer.py
>
> in line 262:
>
> try:
> slist = unicode(list[i], 'utf-8')
> except TypeError:
> slist = str(list[i])
>
> If the variable string contains a character which is not convertable from
> utf8 (like e.g. czech nationale characters encoded in iso-8859-2), then
> the unicode() raises exception UnicodeDecodeError, which is not trapped by
> the eric code.
>
> I dare to suggest the following change:
>
> import locale
>
> try:
> slist = unicode(list[i], locale.getlocale()[1])
> except TypeError:
> slist = str(list[i])
>
> _______________________________________________
> PyKDE mailing list PyKDE at mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the PyQt
mailing list