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.
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.
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.
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
25 #include "oscarcommon.h"
27 gchar
* oscar_encoding_to_utf8(const char *encoding
, const char *text
, int textlen
);
28 gchar
* oscar_utf8_try_convert(PurpleAccount
*account
, OscarData
*od
, const gchar
*msg
);
31 * This attemps to decode an incoming IM into a UTF8 string.
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.
39 gchar
* oscar_decode_im(PurpleAccount
*account
, const char *sourcebn
, guint16 charset
, const gchar
*data
, gsize datalen
);
42 * Figure out what encoding to use when sending a given outgoing message.
44 gchar
* oscar_encode_im(const gchar
*msg
, gsize
*result_len
, guint16
*charset
, gchar
**charsetstr
);