# HG changeset patch # User Mark Huetsch # Date 1156613310 0 # Node ID a8140cbe08cec5813966fd8c6152599100e9681c # Parent fd744ac113313b4796c516b492489973fb0b7b3c [gaim-migrate @ 17049] Convert the font name to UTF-8 when receiving a message. This should fix a bug where users couldn't receive certain IMs in Adium. committer: Tailor Script diff -r fd744ac11331 -r a8140cbe08ce libgaim/protocols/qq/char_conv.c --- a/libgaim/protocols/qq/char_conv.c Sat Aug 26 17:24:10 2006 +0000 +++ b/libgaim/protocols/qq/char_conv.c Sat Aug 26 17:28:30 2006 +0000 @@ -136,14 +136,14 @@ return len + 1; } -/* convert QQ formatted msg to GAIM formatted msg (and UTF-8) */ +/* convert QQ formatted msg to Gaim formatted msg (and UTF-8) */ gchar *qq_encode_to_gaim(guint8 *data, gint len, const gchar *msg) { GString *encoded; guint8 font_attr, font_size, color[3], bar, *cursor; gboolean is_bold, is_italic, is_underline; guint16 charset_code; - gchar *font_name, *color_code, *msg_utf8, *ret; + gchar *font_name, *color_code, *msg_utf8, *tmp, *ret; cursor = data; _qq_show_packet("QQ_MESG recv for font style", data, len); @@ -155,7 +155,9 @@ read_packet_b(data, &cursor, len, &bar); /* skip, not sure of its use */ read_packet_w(data, &cursor, len, &charset_code); - font_name = g_strndup((gchar *) cursor, data + len - cursor); + tmp = g_strndup((gchar *) cursor, data + len - cursor); + font_name = qq_to_utf8(tmp, QQ_CHARSET_DEFAULT); + g_free(tmp); font_size = _get_size(font_attr); is_bold = _check_bold(font_attr);