File:  [Coherent Logic Development] / ChivanetAimPidgin / oscarprpl / src / c / encoding.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Mon Jan 27 19:48:25 2025 UTC (6 months ago) by snw
Branches: MAIN, CoherentLogicDevelopment
CVS tags: test-tag, start, HEAD
Pidgin AIM Plugin for ChivaNet

    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: 
   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);
   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:  */
   39: gchar * oscar_decode_im(PurpleAccount *account, const char *sourcebn, guint16 charset, const gchar *data, gsize datalen);
   40: 
   41: /**
   42:  * Figure out what encoding to use when sending a given outgoing message.
   43:  */
   44: gchar * oscar_encode_im(const gchar *msg, gsize *result_len, guint16 *charset, gchar **charsetstr);
   45: 
   46: #endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>