rtxUTF16.h
Go to the documentation of this file.00001 /* 00002 * Summary: interface for the encoding conversion functions 00003 * Description: interface for the encoding conversion functions needed for 00004 * XML basic encoding and iconv() support. 00005 * 00006 * Related specs are 00007 * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies 00008 * [ISO-10646] UTF-8 and UTF-16 in Annexes 00009 * [ISO-8859-1] ISO Latin-1 characters codes. 00010 * [UNICODE] The Unicode Consortium, "The Unicode Standard -- 00011 * Worldwide Character Encoding -- Version 1.0", Addison- 00012 * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is 00013 * described in Unicode Technical Report #4. 00014 * [US-ASCII] Coded Character Set--7-bit American Standard Code for 00015 * Information Interchange, ANSI X3.4-1986. 00016 * 00017 * Copy: See Copyright for the status of this software. 00018 * 00019 * Author: Daniel Veillard 00020 */ 00021 /* 00022 NOTE: the copyright notice below applies only to source and header files 00023 that include this notice. It does not apply to other Objective Systems 00024 software with different attached notices. 00025 00026 Except where otherwise noted in the source code (e.g. the files hash.c, 00027 list.c and the trio files, which are covered by a similar licence but 00028 with different Copyright notices) all the files are: 00029 00030 Copyright (C) 1998-2003 Daniel Veillard. All Rights Reserved. 00031 00032 Permission is hereby granted, free of charge, to any person obtaining a copy 00033 of this software and associated documentation files (the "Software"), to deal 00034 in the Software without restriction, including without limitation the rights 00035 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00036 copies of the Software, and to permit persons to whom the Software is fur- 00037 nished to do so, subject to the following conditions: 00038 00039 The above copyright notice and this permission notice shall be included in 00040 all copies or substantial portions of the Software. 00041 00042 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00043 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- 00044 NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00045 DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 00046 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- 00047 NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00048 00049 Except as contained in this notice, the name of Daniel Veillard shall not 00050 be used in advertising or otherwise to promote the sale, use or other deal- 00051 ings in this Software without prior written authorization from him. 00052 */ 00057 #ifndef _RTXUTF16_H_ 00058 #define _RTXUTF16_H_ 00059 00060 #include "rtxsrc/rtxContext.h" 00061 00062 #ifdef __cplusplus 00063 extern "C" { 00064 #endif 00065 00084 EXTERNRT int 00085 rtxUTF16LEToUTF8(unsigned char* out, int outlen, 00086 const unsigned char* inb, int inlenb); 00087 00101 EXTERNRT int 00102 rtxUTF8ToUTF16LE(unsigned char* outb, int outlen, 00103 const unsigned char* in, int inlen); 00104 00118 EXTERNRT int 00119 rtxUTF8ToUTF16(unsigned char* outb, int outlen, 00120 const unsigned char* in, int inlen); 00121 00141 EXTERNRT int 00142 rtxUTF16BEToUTF8(unsigned char* out, int outlen, 00143 const unsigned char* inb, int inlenb); 00144 00158 EXTERNRT int 00159 rtxUTF8ToUTF16BE(unsigned char* outb, int outlen, 00160 const unsigned char* in, int inlen); 00161 00174 EXTERNRT int 00175 rtxStreamUTF8ToUTF16 (OSCTXT* pctxt, const unsigned char* in, size_t inlen); 00176 00189 EXTERNRT int 00190 rtxStreamUTF8ToUTF16LE (OSCTXT* pctxt, const unsigned char* in, size_t inlen); 00191 00204 EXTERNRT int 00205 rtxStreamUTF8ToUTF16BE (OSCTXT* pctxt, const unsigned char* in, size_t inlen); 00206 00207 #ifdef __cplusplus 00208 } 00209 #endif 00210 00211 #endif