php-src/ext/xmlrpc/libxmlrpc/encodings.h
2001-09-06 04:13:30 +00:00

47 lines
1.7 KiB
C

/*
This file is part of libXMLRPC - a C library for xml-encoded function calls.
Author: Dan Libby (dan@libby.com)
Epinions.com may be contacted at feedback@epinions-inc.com
*/
/*
Copyright 2000 Epinions, Inc.
Subject to the following 3 conditions, Epinions, Inc. permits you, free
of charge, to (a) use, copy, distribute, modify, perform and display this
software and associated documentation files (the "Software"), and (b)
permit others to whom the Software is furnished to do so as well.
1) The above copyright notice and this permission notice shall be included
without modification in all copies or substantial portions of the
Software.
2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF
ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY
IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE OR NONINFRINGEMENT.
3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING
NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH
DAMAGES.
*/
#ifndef __ENCODINGS__H
#define __ENCODINGS__H
/* these defines are for legacy purposes. */
#define encoding_utf_8 "UTF-8"
typedef const char* ENCODING_ID;
#define utf8_get_encoding_id_string(desired_enc) ((const char*)desired_enc)
#define utf8_get_encoding_id_from_string(id_string) ((ENCODING_ID)id_string)
char* utf8_encode(const char *s, int len, int *newlen, ENCODING_ID encoding);
char* utf8_decode(const char *s, int len, int *newlen, ENCODING_ID encoding);
#endif /* __ENCODINGS__H */