Mercurial > pidgin.yaz
annotate libpurple/protocols/oscar/encoding.h @ 32805:064eb5d78946
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 0ba3afb8adb303a77581a7872d674c600979a5a6)
to branch 'im.pidgin.pidgin' (head 7711a4d267e1fe776387496c764fb63227d70aec)
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 31 Oct 2011 01:25:36 +0000 |
parents | ed520e6e972b |
children |
rev | line source |
---|---|
30817 | 1 /* |
2 * Purple's oscar protocol plugin | |
3 * This file is the legal property of its developers. | |
4 * Please see the AUTHORS file distributed alongside this file. | |
5 * | |
6 * This library is free software; you can redistribute it and/or | |
7 * modify it under the terms of the GNU Lesser General Public | |
8 * License as published by the Free Software Foundation; either | |
9 * version 2 of the License, or (at your option) any later version. | |
10 * | |
11 * This library is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 * Lesser General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU Lesser General Public | |
17 * License along with this library; if not, write to the Free Software | |
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA | |
19 */ | |
20 | |
21 #ifndef _ENCODING_H_ | |
22 #define _ENCODING_H_ | |
23 | |
24 #include "oscar.h" | |
25 #include "oscarcommon.h" | |
26 | |
30819
ca90b6c27eb8
Refactored oscar_encoding_to_utf8().
ivan.komarov@soc.pidgin.im
parents:
30818
diff
changeset
|
27 gchar * oscar_encoding_to_utf8(const char *encoding, const char *text, int textlen); |
30817 | 28 gchar * oscar_utf8_try_convert(PurpleAccount *account, OscarData *od, const gchar *msg); |
29 | |
30 /** | |
31 * This attemps to decode an incoming IM into a UTF8 string. | |
32 * | |
33 * We try decoding using two different character sets. The charset | |
34 * specified in the IM determines the order in which we attempt to | |
35 * decode. We do this because there are lots of broken ICQ clients | |
36 * that don't correctly send non-ASCII messages. And if Purple isn't | |
37 * able to deal with that crap, then people complain like banshees. | |
38 */ | |
30824
5661f30d1b8e
Got rid of receiving multipart messages over channel 1, which simplified the code
ivan.komarov@soc.pidgin.im
parents:
30819
diff
changeset
|
39 gchar * oscar_decode_im(PurpleAccount *account, const char *sourcebn, guint16 charset, const gchar *data, gsize datalen); |
30817 | 40 |
41 /** | |
42 * Figure out what encoding to use when sending a given outgoing message. | |
43 */ | |
30827 | 44 gchar * oscar_encode_im(const gchar *msg, gsize *result_len, guint16 *charset, gchar **charsetstr); |
30817 | 45 |
46 #endif |