Bug#552528: Caused by character set mismatch

Matt Kraai kraai at ftbfs.org
Tue Nov 10 13:25:34 UTC 2009


On Mon, Nov 09, 2009 at 08:33:02PM -0800, Matt Kraai wrote:
> On Mon, Nov 09, 2009 at 11:55:57PM +0100, Josselin Mouette wrote:
> > Le samedi 07 novembre 2009 à 13:32 -0800, Matt Kraai a écrit : 
> > > On my system, alacarte has a segmentation fault if I reconfigure the
> > > locales package to generate the it_IT at euro locale and set LANG to
> > > "it_IT at euro".
> > > 
> > > While it's parsing the UI definition, it translates "Restore the
> > > default menu layout" to "Ripristina la struttura predefinita del
> > > men�", which uses the ISO/IEC 8859-15 character set.  It subsequently
> > > calls g_markup_escape_text on this string, which expects it to use
> > > UTF-8.  This causes it to miss the end of the string and, eventually,
> > > to try to access an inaccessible page, causing the segmentation fault.
> > > 
> > > I don't know where or how this should be fixed.
> > 
> > There is probably a missing bind_textdomain_codeset call, or whatever
> > the equivalent is in Python.
> 
> Python's gettext module provides a bind_textdomain_codeset call, but
> adding
> 
>  gettext.bind_textdomain_codeset(config.GETTEXT_PACKAGE,'UTF-8')
> 
> and prefixing GETTEXT_PACKAGE on the previous two lines with "config."
> doesn't eliminate the segmentation fault.

bind_textdomain_codeset is also provided by the locale module.  When
that version is used, the application does not have a segmentation
fault.  I've attached the patch.  Would it be OK to perform an NMU?

-- 
Matt                                            http://ftbfs.org/kraai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 03-bind_textdomain_codeset.patch
Type: text/x-diff
Size: 765 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20091110/90058209/attachment.patch>


More information about the pkg-gnome-maintainers mailing list