comparison libpurple/protocols/oscar/encoding.h @ 30386:ca90b6c27eb8

Refactored oscar_encoding_to_utf8(). 1. Removed elb's hack from #1645. It doesn't appear to be necessary anymore, since the recent official clients (6.5, 7.1) aren't that stupid now. 2. Simplified logic in incomingim_chan2(). 3. Removed all NULL return check for oscar_encoding_to_utf8(), because it will always return non-NULL value.
author ivan.komarov@soc.pidgin.im
date Wed, 28 Jul 2010 16:30:04 +0000
parents 9d386bf63eab
children 5661f30d1b8e
comparison
equal deleted inserted replaced
30385:9d386bf63eab 30386:ca90b6c27eb8
27 /** 27 /**
28 * Determine the simplest encoding we can send this message in. 28 * Determine the simplest encoding we can send this message in.
29 */ 29 */
30 guint16 oscar_charset_check(const char *utf8); 30 guint16 oscar_charset_check(const char *utf8);
31 31
32 /** 32 gchar * oscar_encoding_to_utf8(const char *encoding, const char *text, int textlen);
33 * Take a string of the form charset="bleh" where bleh is
34 * one of us-ascii, utf-8, iso-8859-1, or unicode-2-0, and
35 * return a newly allocated string containing bleh.
36 */
37 gchar * oscar_encoding_extract(const char *encoding);
38
39 gchar * oscar_encoding_to_utf8(PurpleAccount *account, const char *encoding, const char *text, int textlen);
40 gchar * oscar_utf8_try_convert(PurpleAccount *account, OscarData *od, const gchar *msg); 33 gchar * oscar_utf8_try_convert(PurpleAccount *account, OscarData *od, const gchar *msg);
41 34
42 /** 35 /**
43 * This attemps to decode an incoming IM into a UTF8 string. 36 * This attemps to decode an incoming IM into a UTF8 string.
44 * 37 *