Revision: 17049
Author: markhuetsch
Date: 2006-08-26 10:28:30 -0700 (Sat, 26 Aug 2006)
ViewCVS: http://svn.sourceforge.net/gaim/?rev=17049&view=rev
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/libgaim/protocols/qq/char_conv.c
Modified: trunk/libgaim/protocols/qq/char_conv.c
===================================================================
--- trunk/libgaim/protocols/qq/char_conv.c 2006-08-26 17:24:10 UTC (rev 17048)
+++ trunk/libgaim/protocols/qq/char_conv.c 2006-08-26 17:28:30 UTC (rev 17049)
@@ -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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|