xref: /PHP-7.3/ext/xmlrpc/libxmlrpc/encodings.h (revision b7a7b1a6)
1 /*
2   This file is part of libXMLRPC - a C library for xml-encoded function calls.
3 
4   Author: Dan Libby (dan@libby.com)
5   Epinions.com may be contacted at feedback@epinions-inc.com
6 */
7 
8 /*
9   Copyright 2000 Epinions, Inc.
10 
11   Subject to the following 3 conditions, Epinions, Inc.  permits you, free
12   of charge, to (a) use, copy, distribute, modify, perform and display this
13   software and associated documentation files (the "Software"), and (b)
14   permit others to whom the Software is furnished to do so as well.
15 
16   1) The above copyright notice and this permission notice shall be included
17   without modification in all copies or substantial portions of the
18   Software.
19 
20   2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF
21   ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY
22   IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR
23   PURPOSE OR NONINFRINGEMENT.
24 
25   3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
26   SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
27   OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING
28   NEGLIGENCE), EVEN IF EPINIONS, INC.  IS AWARE OF THE POSSIBILITY OF SUCH
29   DAMAGES.
30 
31 */
32 
33 
34 #ifndef __ENCODINGS__H
35 #define __ENCODINGS__H
36 
37 /* these defines are for legacy purposes. */
38 #define encoding_utf_8 "UTF-8"
39 typedef const char* ENCODING_ID;
40 #define utf8_get_encoding_id_string(desired_enc) ((const char*)desired_enc)
41 #define utf8_get_encoding_id_from_string(id_string) ((ENCODING_ID)id_string)
42 
43 char* utf8_encode(const char *s, int len, int *newlen, ENCODING_ID encoding);
44 char* utf8_decode(const char *s, int len, int *newlen, ENCODING_ID encoding);
45 
46 #endif /* __ENCODINGS__H  */
47