# HG changeset patch # User Mark Doliner # Date 1103852879 0 # Node ID 3fcfab5f0cc6267ee57acb25fa2f0c91f9c63306 # Parent 8ee13eecfee0ceaaec1352b3228d3c6ad3817647 [gaim-migrate @ 11653] sf patch #1088093, from Thomas Huriaux I changed this to use the _with_fallback() thing. I didn't test it. Someone should test this. committer: Tailor Script diff -r 8ee13eecfee0 -r 3fcfab5f0cc6 COPYRIGHT --- a/COPYRIGHT Fri Dec 24 01:32:12 2004 +0000 +++ b/COPYRIGHT Fri Dec 24 01:47:59 2004 +0000 @@ -82,6 +82,7 @@ Nigel Horne Karsten Huneycutt Rian Hunter +Thomas Huriaux Henry Jen Akuke Kok Cole Kowalski diff -r 8ee13eecfee0 -r 3fcfab5f0cc6 src/protocols/gg/gg.c --- a/src/protocols/gg/gg.c Fri Dec 24 01:32:12 2004 +0000 +++ b/src/protocols/gg/gg.c Fri Dec 24 01:47:59 2004 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 11638 2004-12-21 01:48:30Z nosnilmot $ + * $Id: gg.c 11653 2004-12-24 01:47:59Z thekingant $ * * Copyright (C) 2001 Arkadiusz Mi¶kiewicz * @@ -82,6 +82,22 @@ static gchar *charset_convert(const gchar *locstr, const char *encsrc, const char *encdst) { return (g_convert (locstr, strlen (locstr), encdst, encsrc, NULL, NULL, NULL)); + + gchar *msg; + GError *err = NULL; + + msg = g_convert_with_fallback(locstr, strlen(locstr), encdst, encsrc, "?", NULL, NULL, &err); + if (err != NULL) { + gaim_debug_error("gg", "Error converting from %s to %s: %s\n", + encsrc, encdst, err->message); + g_error_free(err); + } + + /* Just in case? */ + if (msg == NULL) + msg = g_strdup(locstr); + + return msg; } static gboolean invalid_uin(const char *uin)