XBinder  Version 2.9.x
rtxUTF16.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-2022 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 _RTXUTF16_H_
58 #define _RTXUTF16_H_
59 
60 #include "rtxsrc/rtxContext.h"
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
84 EXTERNRT int
85 rtxUTF16LEToUTF8(unsigned char* out, int outlen,
86  const unsigned char* inb, int inlenb);
87 
101 EXTERNRT int
102 rtxUTF8ToUTF16LE(unsigned char* outb, int outlen,
103  const unsigned char* in, int inlen);
104 
118 EXTERNRT int
119 rtxUTF8ToUTF16(unsigned char* outb, int outlen,
120  const unsigned char* in, int inlen);
121 
141 EXTERNRT int
142 rtxUTF16BEToUTF8(unsigned char* out, int outlen,
143  const unsigned char* inb, int inlenb);
144 
158 EXTERNRT int
159 rtxUTF8ToUTF16BE(unsigned char* outb, int outlen,
160  const unsigned char* in, int inlen);
161 
174 EXTERNRT int
175 rtxStreamUTF8ToUTF16 (OSCTXT* pctxt, const unsigned char* in, size_t inlen);
176 
189 EXTERNRT int
190 rtxStreamUTF8ToUTF16LE (OSCTXT* pctxt, const unsigned char* in, size_t inlen);
191 
204 EXTERNRT int
205 rtxStreamUTF8ToUTF16BE (OSCTXT* pctxt, const unsigned char* in, size_t inlen);
206 
207 #ifdef __cplusplus
208 }
209 #endif
210 
211 #endif
EXTERNRT int rtxUTF8ToUTF16(unsigned char *outb, int outlen, const unsigned char *in, int inlen)
This function converts a UTF-8 string into a UTF-16 string.
Common run-time context definitions.
EXTERNRT int rtxUTF16LEToUTF8(unsigned char *out, int outlen, const unsigned char *inb, int inlenb)
This function converts a UTF-16LE string into a UTF-8 string.
EXTERNRT int rtxUTF8ToUTF16LE(unsigned char *outb, int outlen, const unsigned char *in, int inlen)
This function converts a UTF-8 string into a UTF-16LE string.
EXTERNRT int rtxStreamUTF8ToUTF16LE(OSCTXT *pctxt, const unsigned char *in, size_t inlen)
This function takes a block of UTF-8 chars in and try to convert it to an UTF-16LE block of chars...
EXTERNRT int rtxUTF8ToUTF16BE(unsigned char *outb, int outlen, const unsigned char *in, int inlen)
This function converts a UTF-8 string into a UTF-16BE string.
EXTERNRT int rtxUTF16BEToUTF8(unsigned char *out, int outlen, const unsigned char *inb, int inlenb)
This function converts a UTF-16BE string into a UTF-8 string.
Run-time context structure.
Definition: rtxContext.h:198
EXTERNRT int rtxStreamUTF8ToUTF16BE(OSCTXT *pctxt, const unsigned char *in, size_t inlen)
This function takes a block of UTF-8 chars in and try to convert it to an UTF-16BE block of chars...
EXTERNRT int rtxStreamUTF8ToUTF16(OSCTXT *pctxt, const unsigned char *in, size_t inlen)
This function takes a block of UTF-8 chars in and try to convert it to an UTF-16 block of chars...