XBinder  Version 2.7.x
rtxLatin1.h
Go to the documentation of this file.
1 /*
2  * Summary: interface for the encoding conversion functions
3  * Description: interface for the encoding conversion functions needed for
4  * XML basic encoding and iconv() support.
5  *
6  * Related specs are
7  * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies
8  * [ISO-10646] UTF-8 and UTF-16 in Annexes
9  * [ISO-8859-1] ISO Latin-1 characters codes.
10  * [UNICODE] The Unicode Consortium, "The Unicode Standard --
11  * Worldwide Character Encoding -- Version 1.0", Addison-
12  * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is
13  * described in Unicode Technical Report #4.
14  * [US-ASCII] Coded Character Set--7-bit American Standard Code for
15  * Information Interchange, ANSI X3.4-1986.
16  *
17  * Copy: See Copyright for the status of this software.
18  *
19  * Author: Daniel Veillard
20  */
21 /*
22 NOTE: the copyright notice below applies only to source and header files
23 that include this notice. It does not apply to other Objective Systems
24 software with different attached notices.
25 
26 Except where otherwise noted in the source code (e.g. the files hash.c,
27 list.c and the trio files, which are covered by a similar licence but
28 with different Copyright notices) all the files are:
29 
30  Copyright (C) 1998-2003 Daniel Veillard. All Rights Reserved.
31 
32 Permission is hereby granted, free of charge, to any person obtaining a copy
33 of this software and associated documentation files (the "Software"), to deal
34 in the Software without restriction, including without limitation the rights
35 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36 copies of the Software, and to permit persons to whom the Software is fur-
37 nished to do so, subject to the following conditions:
38 
39 The above copyright notice and this permission notice shall be included in
40 all copies or substantial portions of the Software.
41 
42 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
44 NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45 DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
46 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
47 NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
48 
49 Except as contained in this notice, the name of Daniel Veillard shall not
50 be used in advertising or otherwise to promote the sale, use or other deal-
51 ings in this Software without prior written authorization from him.
52 */
57 #ifndef _RTXLATIN1_H_
58 #define _RTXLATIN1_H_
59 
60 #include "rtxsrc/rtxContext.h"
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
80 EXTERNRT int rtxLatin1ToUTF8
81 (const OSUTF8CHAR* inbuf, int inlen, OSUTF8CHAR* outbuf, int outbufsize);
82 
97 EXTERNRT int rtxUTF8ToLatin1
98 (const OSUTF8CHAR* inbuf, int inlen, OSUTF8CHAR* outbuf, int outbufsize);
99 
112 EXTERNRT int rtxStreamUTF8ToLatin1
113 (OSCTXT* pctxt, const OSUTF8CHAR* inbuf, size_t inlen);
114 
115 #ifdef __cplusplus
116 }
117 #endif
118 
119 #endif
Common run-time context definitions.
EXTERNRT int rtxUTF8ToLatin1(const OSUTF8CHAR *inbuf, int inlen, OSUTF8CHAR *outbuf, int outbufsize)
This function converts a UTF-8 encoded byte stream into an ISO 8859-1 encoded string.
EXTERNRT int rtxLatin1ToUTF8(const OSUTF8CHAR *inbuf, int inlen, OSUTF8CHAR *outbuf, int outbufsize)
This function converts an ISO 8859-1 encoded string into a UTF-8 string.
Run-time context structure.
Definition: rtxContext.h:197
EXTERNRT int rtxStreamUTF8ToLatin1(OSCTXT *pctxt, const OSUTF8CHAR *inbuf, size_t inlen)
This function converts a UTF-8 encoded byte stream into an ISO 8859-1 encoded string, and write it to stream.