author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
permissions | -rw-r--r-- |
4
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
1 |
/* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
2 |
* Summary: interface for the encoding conversion functions |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
3 |
* Description: interface for the encoding conversion functions needed for |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
4 |
* XML basic encoding and iconv() support. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
5 |
* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
6 |
* Related specs are |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
7 |
* rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
8 |
* [ISO-10646] UTF-8 and UTF-16 in Annexes |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
9 |
* [ISO-8859-1] ISO Latin-1 characters codes. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
10 |
* [UNICODE] The Unicode Consortium, "The Unicode Standard -- |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
11 |
* Worldwide Character Encoding -- Version 1.0", Addison- |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
12 |
* Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
13 |
* described in Unicode Technical Report #4. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
14 |
* [US-ASCII] Coded Character Set--7-bit American Standard Code for |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
15 |
* Information Interchange, ANSI X3.4-1986. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
16 |
* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
17 |
* Copy: See Copyright for the status of this software. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
18 |
* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
19 |
* Author: Daniel Veillard |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
20 |
* Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
21 |
*/ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
22 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
23 |
/** @file |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
24 |
@publishedAll |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
25 |
@released |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
26 |
*/ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
27 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
28 |
#ifndef XML_CHAR_ENCODING_H |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
29 |
#define XML_CHAR_ENCODING_H |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
30 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
31 |
//#include "libxml/Libxml2_xmlversion.h" // enable this when dependency on tree.h is removed |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
32 |
#include "libxml2_tree.h" |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
33 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
34 |
#ifdef LIBXML_ICONV_ENABLED |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
35 |
#include <iconv.h> |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
36 |
#endif |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
37 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
38 |
#ifdef __cplusplus |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
39 |
extern "C" { |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
40 |
#endif |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
41 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
42 |
/* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
43 |
* xmlCharEncoding: |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
44 |
* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
45 |
* Predefined values for some standard encodings. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
46 |
* Libxml does not do beforehand translation on UTF8 and ISOLatinX. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
47 |
* It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
48 |
* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
49 |
* Anything else would have to be translated to UTF8 before being |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
50 |
* given to the parser itself. The BOM for UTF16 and the encoding |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
51 |
* declaration are looked at and a converter is looked for at that |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
52 |
* point. If not found the parser stops here as asked by the XML REC. A |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
53 |
* converter can be registered by the user using xmlRegisterCharEncodingHandler |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
54 |
* but the current form doesn't allow stateful transcoding (a serious |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
55 |
* problem agreed !). If iconv has been found it will be used |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
56 |
* automatically and allow stateful transcoding, the simplest is then |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
57 |
* to be sure to enable iconv and to provide iconv libs for the encoding |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
58 |
* support needed. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
59 |
* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
60 |
* Note that the generic "UTF-16" is not a predefined value. Instead, only |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
61 |
* the specific UTF-16LE and UTF-16BE are present. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
62 |
*/ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
63 |
typedef enum { |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
64 |
XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
65 |
XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
66 |
XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
67 |
XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
68 |
XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
69 |
XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
70 |
XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
71 |
XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
72 |
XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
73 |
XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
74 |
XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
75 |
XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
76 |
XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
77 |
XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
78 |
XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
79 |
XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
80 |
XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
81 |
XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
82 |
XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
83 |
XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
84 |
XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
85 |
XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
86 |
XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
87 |
XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
88 |
} xmlCharEncoding; |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
89 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
90 |
/** |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
91 |
* xmlCharEncodingInputFunc: |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
92 |
* @param out a pointer to an array of bytes to store the UTF-8 result |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
93 |
* @param outlen the length of out |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
94 |
* @param in a pointer to an array of chars in the original encoding |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
95 |
* @param inlen the length of in |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
96 |
* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
97 |
* Take a block of chars in the original encoding and try to convert |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
98 |
* it to an UTF-8 block of chars out. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
99 |
* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
100 |
* Returns the number of bytes written, -1 if lack of space, or -2 |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
101 |
* if the transcoding failed. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
102 |
* The value of inlen after return is the number of octets consumed |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
103 |
* if the return value is positive, else unpredictiable. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
104 |
* The value of outlen after return is the number of octets consumed. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
105 |
*/ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
106 |
typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
107 |
const unsigned char *in, int *inlen); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
108 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
109 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
110 |
/** |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
111 |
* xmlCharEncodingOutputFunc: |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
112 |
* @param out a pointer to an array of bytes to store the result |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
113 |
* @param outlen the length of out |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
114 |
* @param in a pointer to an array of UTF-8 chars |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
115 |
* @param inlen the length of in |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
116 |
* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
117 |
* Take a block of UTF-8 chars in and try to convert it to another |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
118 |
* encoding. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
119 |
* Note: a first call designed to produce heading info is called with |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
120 |
* in = NULL. If stateful this should also initialize the encoder state. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
121 |
* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
122 |
* Returns the number of bytes written, -1 if lack of space, or -2 |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
123 |
* if the transcoding failed. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
124 |
* The value of inlen after return is the number of octets consumed |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
125 |
* if the return value is positive, else unpredictiable. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
126 |
* The value of outlen after return is the number of octets produced. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
127 |
*/ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
128 |
typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
129 |
const unsigned char *in, int *inlen); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
130 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
131 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
132 |
/* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
133 |
* Block defining the handlers for non UTF-8 encodings. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
134 |
* If iconv is supported, there are two extra fields. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
135 |
*/ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
136 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
137 |
typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler; |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
138 |
typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr; |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
139 |
struct _xmlCharEncodingHandler { |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
140 |
char *name; |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
141 |
xmlCharEncodingInputFunc input; |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
142 |
xmlCharEncodingOutputFunc output; |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
143 |
#ifdef LIBXML_ICONV_ENABLED |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
144 |
iconv_t iconv_in; |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
145 |
iconv_t iconv_out; |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
146 |
#endif /* LIBXML_ICONV_ENABLED */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
147 |
}; |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
148 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
149 |
//#ifdef __cplusplus |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
150 |
//} |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
151 |
//#endif |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
152 |
//#ifdef __cplusplus |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
153 |
//extern "C" { |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
154 |
//#endif |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
155 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
156 |
/* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
157 |
* Interfaces for encoding handlers. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
158 |
*/ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
159 |
XMLPUBFUN void XMLCALL |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
160 |
xmlInitCharEncodingHandlers (void); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
161 |
XMLPUBFUN void XMLCALL |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
162 |
xmlCleanupCharEncodingHandlers (void); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
163 |
XMLPUBFUN void XMLCALL |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
164 |
xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
165 |
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
166 |
xmlGetCharEncodingHandler (xmlCharEncoding enc); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
167 |
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
168 |
xmlFindCharEncodingHandler (const char *name); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
169 |
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
170 |
xmlNewCharEncodingHandler (const char *name, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
171 |
xmlCharEncodingInputFunc input, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
172 |
xmlCharEncodingOutputFunc output); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
173 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
174 |
/* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
175 |
* Interfaces for encoding names and aliases. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
176 |
*/ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
177 |
#ifndef XMLENGINE_EXCLUDE_UNUSED |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
178 |
XMLPUBFUN int XMLCALL xmlAddEncodingAlias(const char *name, const char *alias); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
179 |
XMLPUBFUN int XMLCALL xmlDelEncodingAlias(const char *alias); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
180 |
#endif |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
181 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
182 |
XMLPUBFUN const char * XMLCALL xmlGetEncodingAlias (const char *alias); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
183 |
XMLPUBFUN void XMLCALL xmlCleanupEncodingAliases (void); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
184 |
XMLPUBFUN xmlCharEncoding XMLCALL xmlParseCharEncoding (const char *name); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
185 |
XMLPUBFUN const char * XMLCALL xmlGetCharEncodingName (xmlCharEncoding enc); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
186 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
187 |
/* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
188 |
* Interfaces directly used by the parsers. |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
189 |
*/ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
190 |
XMLPUBFUN xmlCharEncoding XMLCALL |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
191 |
xmlDetectCharEncoding (const unsigned char *in, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
192 |
int len); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
193 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
194 |
XMLPUBFUN int XMLCALL |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
195 |
xmlCharEncOutFunc (xmlCharEncodingHandler *handler, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
196 |
xmlBufferPtr out, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
197 |
xmlBufferPtr in); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
198 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
199 |
XMLPUBFUN int XMLCALL |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
200 |
xmlCharEncInFunc (xmlCharEncodingHandler *handler, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
201 |
xmlBufferPtr out, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
202 |
xmlBufferPtr in); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
203 |
XMLPUBFUN int XMLCALL |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
204 |
xmlCharEncFirstLine (xmlCharEncodingHandler *handler, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
205 |
xmlBufferPtr out, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
206 |
xmlBufferPtr in); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
207 |
XMLPUBFUN int XMLCALL |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
208 |
xmlCharEncCloseFunc (xmlCharEncodingHandler *handler); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
209 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
210 |
/* |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
211 |
* Export a few useful functions |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
212 |
*/ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
213 |
XMLPUBFUN int XMLCALL |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
214 |
UTF8Toisolat1 (unsigned char *out, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
215 |
int *outlen, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
216 |
const unsigned char *in, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
217 |
int *inlen); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
218 |
XMLPUBFUN int XMLCALL |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
219 |
isolat1ToUTF8 (unsigned char *out, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
220 |
int *outlen, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
221 |
const unsigned char *in, |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
222 |
int *inlen); |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
223 |
#ifdef __cplusplus |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
224 |
} |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
225 |
#endif |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
226 |
|
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
227 |
#endif /* XML_CHAR_ENCODING_H */ |
837f303aceeb
Current Symbian^3 public API header files (from PDK 3.0.h)
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
228 |