Mercurial > pidgin.yaz
changeset 10407:3fcfab5f0cc6
[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 <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 24 Dec 2004 01:47:59 +0000 |
parents | 8ee13eecfee0 |
children | f53c59c95f03 |
files | COPYRIGHT src/protocols/gg/gg.c |
diffstat | 2 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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 <misiek@pld.ORG.PL> * @@ -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)