Fix currency display in locale with non utf8 charset

David Hampton hampton-gnucash at rainbolthampton.net
Thu Oct 20 15:44:21 EDT 2005


On Thu, 2005-10-20 at 13:14 +0200, Didier Vidal wrote:
> I was not sure about the copy, especially if the string is already utf8
> before we call g_locale_to_utf8. I prefered to risk a small leak than a
> crash.
> But if someone knows what happens behind the cover, he could remove the
> strdup...

Internally g_locale_to_utf8() calls either strdup_len() or g_convert().
Each of these functions is defined to return a newly allocated string,
or NULL.  The call to strdup should be removed.

David




More information about the gnucash-patches mailing list