blob: 7ddbb2a716b02fb1c9d54504a307a8ffa525fcd8 [file] [log] [blame]
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001<HTML
2><HEAD
3><TITLE
4>encoding</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillardbed7b052001-05-19 14:59:49 +00007CONTENT="Modular DocBook HTML Stylesheet Version 1.59"><LINK
Daniel Veillardaeea04f2000-01-25 19:27:27 +00008REL="HOME"
9TITLE="Gnome XML Library Reference Manual"
10HREF="book1.html"><LINK
11REL="UP"
12TITLE="Libxml Library Reference"
13HREF="libxml-lib.html"><LINK
14REL="PREVIOUS"
15TITLE="parserInternals"
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000016HREF="libxml-parserinternals.html"><LINK
Daniel Veillardaeea04f2000-01-25 19:27:27 +000017REL="NEXT"
18TITLE="debugXML"
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000019HREF="libxml-debugxml.html"></HEAD
Daniel Veillardaeea04f2000-01-25 19:27:27 +000020><BODY
Daniel Veillardbed7b052001-05-19 14:59:49 +000021CLASS="REFENTRY"
Daniel Veillardaeea04f2000-01-25 19:27:27 +000022BGCOLOR="#FFFFFF"
23TEXT="#000000"
Daniel Veillard503b8932001-01-05 06:36:31 +000024LINK="#0000FF"
25VLINK="#840084"
26ALINK="#0000FF"
Daniel Veillardaeea04f2000-01-25 19:27:27 +000027><DIV
28CLASS="NAVHEADER"
29><TABLE
30WIDTH="100%"
31BORDER="0"
32BGCOLOR="#000000"
33CELLPADDING="1"
34CELLSPACING="0"
35><TR
36><TH
37COLSPAN="4"
38ALIGN="center"
39><FONT
40COLOR="#FFFFFF"
41SIZE="5"
42>Gnome XML Library Reference Manual</FONT
43></TH
44></TR
45><TR
46><TD
47WIDTH="25%"
48BGCOLOR="#C00000"
49ALIGN="left"
50><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000051HREF="libxml-parserinternals.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +000052><FONT
53COLOR="#FFFFFF"
54SIZE="3"
55><B
56>&#60;&#60;&#60; Previous Page</B
57></FONT
58></A
59></TD
60><TD
61WIDTH="25%"
62BGCOLOR="#0000C0"
63ALIGN="center"
64><FONT
65COLOR="#FFFFFF"
66SIZE="3"
67><B
68><A
69HREF="book1.html"
70><FONT
71COLOR="#FFFFFF"
72SIZE="3"
73><B
74>Home</B
75></FONT
76></A
77></B
78></FONT
79></TD
80><TD
81WIDTH="25%"
82BGCOLOR="#00C000"
83ALIGN="center"
84><FONT
85COLOR="#FFFFFF"
86SIZE="3"
87><B
88><A
89HREF="libxml-lib.html"
90><FONT
91COLOR="#FFFFFF"
92SIZE="3"
93><B
94>Up</B
95></FONT
96></A
97></B
98></FONT
99></TD
100><TD
101WIDTH="25%"
102BGCOLOR="#C00000"
103ALIGN="right"
104><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000105HREF="libxml-debugxml.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000106><FONT
107COLOR="#FFFFFF"
108SIZE="3"
109><B
110>Next Page &#62;&#62;&#62;</B
111></FONT
112></A
113></TD
114></TR
115></TABLE
116></DIV
117><H1
Daniel Veillard503b8932001-01-05 06:36:31 +0000118><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000119NAME="LIBXML-ENCODING"
Daniel Veillard503b8932001-01-05 06:36:31 +0000120>encoding</A
121></H1
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000122><DIV
123CLASS="REFNAMEDIV"
124><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000125NAME="AEN20570"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000126></A
127><H2
128>Name</H2
Daniel Veillard503b8932001-01-05 06:36:31 +0000129>encoding&nbsp;--&nbsp;</DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000130><DIV
131CLASS="REFSYNOPSISDIV"
132><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000133NAME="AEN20573"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000134></A
135><H2
136>Synopsis</H2
137><TABLE
138BORDER="0"
139BGCOLOR="#D6E8FF"
140WIDTH="100%"
141CELLPADDING="6"
142><TR
143><TD
144><PRE
145CLASS="SYNOPSIS"
146>&#13;
147
148enum <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000149HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000150>xmlCharEncoding</A
151>;
152int (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000153HREF="libxml-encoding.html#XMLCHARENCODINGINPUTFUNC"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000154>*xmlCharEncodingInputFunc</A
155>) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000156 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000157 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000158 int *inlen);
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000159int (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000160HREF="libxml-encoding.html#XMLCHARENCODINGOUTPUTFUNC"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000161>*xmlCharEncodingOutputFunc</A
162>) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000163 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000164 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000165 int *inlen);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000166struct <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000167HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000168>xmlCharEncodingHandler</A
169>;
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000170typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000171HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000172>xmlCharEncodingHandlerPtr</A
173>;
174void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000175HREF="libxml-encoding.html#XMLINITCHARENCODINGHANDLERS"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000176>xmlInitCharEncodingHandlers</A
177> (void);
178void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000179HREF="libxml-encoding.html#XMLCLEANUPCHARENCODINGHANDLERS"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000180>xmlCleanupCharEncodingHandlers</A
181> (void);
182void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000183HREF="libxml-encoding.html#XMLREGISTERCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000184>xmlRegisterCharEncodingHandler</A
185> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000186HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000187>xmlCharEncodingHandlerPtr</A
188> handler);
189<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000190HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000191>xmlCharEncodingHandlerPtr</A
192> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000193HREF="libxml-encoding.html#XMLGETCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000194>xmlGetCharEncodingHandler</A
195>
196 (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000197HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000198>xmlCharEncoding</A
199> enc);
200<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000201HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000202>xmlCharEncodingHandlerPtr</A
203> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000204HREF="libxml-encoding.html#XMLFINDCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000205>xmlFindCharEncodingHandler</A
206>
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000207 (const char *name);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000208int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000209HREF="libxml-encoding.html#XMLADDENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000210>xmlAddEncodingAlias</A
211> (const char *name,
212 const char *alias);
213int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000214HREF="libxml-encoding.html#XMLDELENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000215>xmlDelEncodingAlias</A
216> (const char *alias);
217const char* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000218HREF="libxml-encoding.html#XMLGETENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000219>xmlGetEncodingAlias</A
220> (const char *alias);
221void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000222HREF="libxml-encoding.html#XMLCLEANUPENCODINGALIASES"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000223>xmlCleanupEncodingAliases</A
224> (void);
225<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000226HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000227>xmlCharEncoding</A
228> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000229HREF="libxml-encoding.html#XMLPARSECHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000230>xmlParseCharEncoding</A
231> (const char *name);
232const char* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000233HREF="libxml-encoding.html#XMLGETCHARENCODINGNAME"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000234>xmlGetCharEncodingName</A
235> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000236HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000237>xmlCharEncoding</A
238> enc);
239<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000240HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000241>xmlCharEncoding</A
242> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000243HREF="libxml-encoding.html#XMLDETECTCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000244>xmlDetectCharEncoding</A
245> (unsigned char *in,
246 int len);
247int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000248HREF="libxml-encoding.html#XMLCHARENCOUTFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000249>xmlCharEncOutFunc</A
250> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000251HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000252>xmlCharEncodingHandler</A
253> *handler,
254 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000255HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000256>xmlBufferPtr</A
257> out,
258 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000259HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000260>xmlBufferPtr</A
261> in);
262int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000263HREF="libxml-encoding.html#XMLCHARENCINFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000264>xmlCharEncInFunc</A
265> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000266HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000267>xmlCharEncodingHandler</A
268> *handler,
269 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000270HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000271>xmlBufferPtr</A
272> out,
273 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000274HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000275>xmlBufferPtr</A
276> in);
277int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000278HREF="libxml-encoding.html#XMLCHARENCFIRSTLINE"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000279>xmlCharEncFirstLine</A
280> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000281HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000282>xmlCharEncodingHandler</A
283> *handler,
284 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000285HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000286>xmlBufferPtr</A
287> out,
288 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000289HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000290>xmlBufferPtr</A
291> in);
292int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000293HREF="libxml-encoding.html#XMLCHARENCCLOSEFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000294>xmlCharEncCloseFunc</A
295> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000296HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000297>xmlCharEncodingHandler</A
Daniel Veillarda41123c2001-04-22 19:31:20 +0000298> *handler);
299int <A
300HREF="libxml-encoding.html#UTF8TOISOLAT1"
301>UTF8Toisolat1</A
302> (unsigned char *out,
303 int *outlen,
304 unsigned char *in,
305 int *inlen);
306int <A
307HREF="libxml-encoding.html#ISOLAT1TOUTF8"
308>isolat1ToUTF8</A
309> (unsigned char *out,
310 int *outlen,
311 unsigned char *in,
312 int *inlen);
313int <A
314HREF="libxml-encoding.html#XMLCHECKUTF8"
315>xmlCheckUTF8</A
316> (unsigned char *utf);
317int <A
318HREF="libxml-encoding.html#XMLUTF8STRLEN"
319>xmlUTF8Strlen</A
320> (unsigned char *utf);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000321></TD
322></TR
323></TABLE
324></DIV
325><DIV
326CLASS="REFSECT1"
327><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000328NAME="AEN20618"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000329></A
330><H2
331>Description</H2
332><P
333></P
334></DIV
335><DIV
336CLASS="REFSECT1"
337><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000338NAME="AEN20621"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000339></A
340><H2
341>Details</H2
342><DIV
343CLASS="REFSECT2"
344><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000345NAME="AEN20623"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000346></A
347><H3
348><A
349NAME="XMLCHARENCODING"
350></A
351>enum xmlCharEncoding</H3
352><TABLE
353BORDER="0"
354BGCOLOR="#D6E8FF"
355WIDTH="100%"
356CELLPADDING="6"
357><TR
358><TD
359><PRE
360CLASS="PROGRAMLISTING"
361>typedef enum {
362 XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
363 XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
364 XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
365 XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
366 XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
367 XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
368 XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
369 XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
370 XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
371 XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
372 XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
373 XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
374 XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
375 XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
376 XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
377 XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
378 XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
379 XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
380 XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
381 XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
382 XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
383 XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
Daniel Veillarde46e20d2000-07-14 15:02:46 +0000384 XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
385 XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000386} xmlCharEncoding;</PRE
387></TD
388></TR
389></TABLE
390><P
Daniel Veillardbed7b052001-05-19 14:59:49 +0000391>Predefined values for some standard encodings
392Libxml don't do beforehand translation on UTF8, ISOLatinX
393It also support UTF16 (LE and BE) by default.</P
394><P
395>Anything else would have to be translated to UTF8 before being
396given to the parser itself. The BOM for UTF16 and the encoding
397declaration are looked at and a converter is looked for at that
398point. If not found the parser stops here as asked by the XML REC
399Converter can be registered by the user using xmlRegisterCharEncodingHandler
400but the currentl form doesn't allow stateful transcoding (a serious
401problem agreed !). If iconv has been found it will be used
402automatically and allow stateful transcoding, the simplest is then
403to be sure to enable icon and to provide iconv libs for the encoding
404support needed.</P
405><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000406></P
407></DIV
408><HR><DIV
409CLASS="REFSECT2"
410><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000411NAME="AEN20630"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000412></A
413><H3
414><A
415NAME="XMLCHARENCODINGINPUTFUNC"
416></A
417>xmlCharEncodingInputFunc ()</H3
418><TABLE
419BORDER="0"
420BGCOLOR="#D6E8FF"
421WIDTH="100%"
422CELLPADDING="6"
423><TR
424><TD
425><PRE
426CLASS="PROGRAMLISTING"
427>int (*xmlCharEncodingInputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000428 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000429 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000430 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000431></TD
432></TR
433></TABLE
434><P
Daniel Veillardbed7b052001-05-19 14:59:49 +0000435>Take a block of chars in the original encoding and try to convert
436it to an UTF-8 block of chars out.</P
437><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000438></P
439><DIV
440CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000441><A
442NAME="AEN20636"
443></A
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000444><P
445></P
446><TABLE
447BORDER="0"
448WIDTH="100%"
449BGCOLOR="#FFD0D0"
450CELLSPACING="0"
451CELLPADDING="4"
452CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000453><TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000454><TR
455><TD
456WIDTH="20%"
457ALIGN="RIGHT"
458VALIGN="TOP"
459><TT
460CLASS="PARAMETER"
461><I
462>out</I
463></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000464>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000465><TD
466WIDTH="80%"
467ALIGN="LEFT"
468VALIGN="TOP"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000469> a pointer ot an array of bytes to store the UTF-8 result</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000470></TR
471><TR
472><TD
473WIDTH="20%"
474ALIGN="RIGHT"
475VALIGN="TOP"
476><TT
477CLASS="PARAMETER"
478><I
479>outlen</I
480></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000481>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000482><TD
483WIDTH="80%"
484ALIGN="LEFT"
485VALIGN="TOP"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000486> the lenght of <TT
487CLASS="PARAMETER"
488><I
489>out</I
490></TT
491></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000492></TR
493><TR
494><TD
495WIDTH="20%"
496ALIGN="RIGHT"
497VALIGN="TOP"
498><TT
499CLASS="PARAMETER"
500><I
501>in</I
502></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000503>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000504><TD
505WIDTH="80%"
506ALIGN="LEFT"
507VALIGN="TOP"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000508> a pointer ot an array of chars in the original encoding</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000509></TR
510><TR
511><TD
512WIDTH="20%"
513ALIGN="RIGHT"
514VALIGN="TOP"
515><TT
516CLASS="PARAMETER"
517><I
518>inlen</I
519></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000520>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000521><TD
522WIDTH="80%"
523ALIGN="LEFT"
524VALIGN="TOP"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000525> the lenght of <TT
526CLASS="PARAMETER"
527><I
528>in</I
529></TT
530></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000531></TR
532><TR
533><TD
534WIDTH="20%"
535ALIGN="RIGHT"
536VALIGN="TOP"
537><I
538CLASS="EMPHASIS"
539>Returns</I
540> :</TD
541><TD
542WIDTH="80%"
543ALIGN="LEFT"
544VALIGN="TOP"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000545>the number of byte written, or -1 by lack of space, or -2
546if the transcoding failed.
547The value of <TT
548CLASS="PARAMETER"
549><I
550>inlen</I
551></TT
552> after return is the number of octets consumed
553as the return value is positive, else unpredictiable.
554The value of <TT
555CLASS="PARAMETER"
556><I
557>outlen</I
558></TT
559> after return is the number of ocetes consumed.</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000560></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000561></TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000562></TABLE
563><P
564></P
565></DIV
566></DIV
567><HR><DIV
568CLASS="REFSECT2"
569><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000570NAME="AEN20665"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000571></A
572><H3
573><A
574NAME="XMLCHARENCODINGOUTPUTFUNC"
575></A
576>xmlCharEncodingOutputFunc ()</H3
577><TABLE
578BORDER="0"
579BGCOLOR="#D6E8FF"
580WIDTH="100%"
581CELLPADDING="6"
582><TR
583><TD
584><PRE
585CLASS="PROGRAMLISTING"
586>int (*xmlCharEncodingOutputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000587 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000588 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000589 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000590></TD
591></TR
592></TABLE
593><P
Daniel Veillardbed7b052001-05-19 14:59:49 +0000594>Take a block of UTF-8 chars in and try to convert it to an other
595encoding.
596Note: a first call designed to produce heading info is called with
597in = NULL. If stateful this should also initialize the encoder state</P
598><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000599></P
600><DIV
601CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000602><A
603NAME="AEN20671"
604></A
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000605><P
606></P
607><TABLE
608BORDER="0"
609WIDTH="100%"
610BGCOLOR="#FFD0D0"
611CELLSPACING="0"
612CELLPADDING="4"
613CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000614><TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000615><TR
616><TD
617WIDTH="20%"
618ALIGN="RIGHT"
619VALIGN="TOP"
620><TT
621CLASS="PARAMETER"
622><I
623>out</I
624></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000625>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000626><TD
627WIDTH="80%"
628ALIGN="LEFT"
629VALIGN="TOP"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000630> a pointer ot an array of bytes to store the result</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000631></TR
632><TR
633><TD
634WIDTH="20%"
635ALIGN="RIGHT"
636VALIGN="TOP"
637><TT
638CLASS="PARAMETER"
639><I
640>outlen</I
641></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000642>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000643><TD
644WIDTH="80%"
645ALIGN="LEFT"
646VALIGN="TOP"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000647> the lenght of <TT
648CLASS="PARAMETER"
649><I
650>out</I
651></TT
652></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000653></TR
654><TR
655><TD
656WIDTH="20%"
657ALIGN="RIGHT"
658VALIGN="TOP"
659><TT
660CLASS="PARAMETER"
661><I
662>in</I
663></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000664>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000665><TD
666WIDTH="80%"
667ALIGN="LEFT"
668VALIGN="TOP"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000669> a pointer ot an array of UTF-8 chars</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000670></TR
671><TR
672><TD
673WIDTH="20%"
674ALIGN="RIGHT"
675VALIGN="TOP"
676><TT
677CLASS="PARAMETER"
678><I
679>inlen</I
680></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000681>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000682><TD
683WIDTH="80%"
684ALIGN="LEFT"
685VALIGN="TOP"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000686> the lenght of <TT
687CLASS="PARAMETER"
688><I
689>in</I
690></TT
691></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000692></TR
693><TR
694><TD
695WIDTH="20%"
696ALIGN="RIGHT"
697VALIGN="TOP"
698><I
699CLASS="EMPHASIS"
700>Returns</I
701> :</TD
702><TD
703WIDTH="80%"
704ALIGN="LEFT"
705VALIGN="TOP"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000706>the number of byte written, or -1 by lack of space, or -2
707if the transcoding failed.
708The value of <TT
709CLASS="PARAMETER"
710><I
711>inlen</I
712></TT
713> after return is the number of octets consumed
714as the return value is positive, else unpredictiable.
715The value of <TT
716CLASS="PARAMETER"
717><I
718>outlen</I
719></TT
720> after return is the number of ocetes consumed.</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000721></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000722></TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000723></TABLE
724><P
725></P
726></DIV
727></DIV
728><HR><DIV
729CLASS="REFSECT2"
730><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000731NAME="AEN20700"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000732></A
733><H3
734><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000735NAME="XMLCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000736></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000737>struct xmlCharEncodingHandler</H3
738><TABLE
739BORDER="0"
740BGCOLOR="#D6E8FF"
741WIDTH="100%"
742CELLPADDING="6"
743><TR
744><TD
745><PRE
746CLASS="PROGRAMLISTING"
747>struct xmlCharEncodingHandler {
748 char *name;
749 xmlCharEncodingInputFunc input;
750 xmlCharEncodingOutputFunc output;
751#ifdef LIBXML_ICONV_ENABLED
752 iconv_t iconv_in;
753 iconv_t iconv_out;
754#endif /* LIBXML_ICONV_ENABLED */
755};</PRE
756></TD
757></TR
758></TABLE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000759><P
760></P
761></DIV
762><HR><DIV
763CLASS="REFSECT2"
764><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000765NAME="AEN20705"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000766></A
767><H3
768><A
769NAME="XMLCHARENCODINGHANDLERPTR"
770></A
771>xmlCharEncodingHandlerPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000772><TABLE
773BORDER="0"
774BGCOLOR="#D6E8FF"
775WIDTH="100%"
776CELLPADDING="6"
777><TR
778><TD
779><PRE
780CLASS="PROGRAMLISTING"
781>typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;</PRE
782></TD
783></TR
784></TABLE
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000785><P
786></P
787></DIV
788><HR><DIV
789CLASS="REFSECT2"
790><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000791NAME="AEN20710"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000792></A
793><H3
794><A
795NAME="XMLINITCHARENCODINGHANDLERS"
796></A
797>xmlInitCharEncodingHandlers ()</H3
798><TABLE
799BORDER="0"
800BGCOLOR="#D6E8FF"
801WIDTH="100%"
802CELLPADDING="6"
803><TR
804><TD
805><PRE
806CLASS="PROGRAMLISTING"
807>void xmlInitCharEncodingHandlers (void);</PRE
808></TD
809></TR
810></TABLE
811><P
812>Initialize the char encoding support, it registers the default
813encoding supported.
814NOTE: while public, this function usually doesn't need to be called
815in normal processing.</P
816><P
817></P
818></DIV
819><HR><DIV
820CLASS="REFSECT2"
821><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000822NAME="AEN20716"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000823></A
824><H3
825><A
826NAME="XMLCLEANUPCHARENCODINGHANDLERS"
827></A
828>xmlCleanupCharEncodingHandlers ()</H3
829><TABLE
830BORDER="0"
831BGCOLOR="#D6E8FF"
832WIDTH="100%"
833CELLPADDING="6"
834><TR
835><TD
836><PRE
837CLASS="PROGRAMLISTING"
838>void xmlCleanupCharEncodingHandlers (void);</PRE
839></TD
840></TR
841></TABLE
842><P
843>Cleanup the memory allocated for the char encoding support, it
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000844unregisters all the encoding handlers and the aliases.</P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000845><P
846></P
847></DIV
848><HR><DIV
849CLASS="REFSECT2"
850><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000851NAME="AEN20722"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000852></A
853><H3
854><A
855NAME="XMLREGISTERCHARENCODINGHANDLER"
856></A
857>xmlRegisterCharEncodingHandler ()</H3
858><TABLE
859BORDER="0"
860BGCOLOR="#D6E8FF"
861WIDTH="100%"
862CELLPADDING="6"
863><TR
864><TD
865><PRE
866CLASS="PROGRAMLISTING"
867>void xmlRegisterCharEncodingHandler (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000868HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000869>xmlCharEncodingHandlerPtr</A
870> handler);</PRE
871></TD
872></TR
873></TABLE
874><P
875>Register the char encoding handler, surprizing, isn't it ?</P
876><P
877></P
878><DIV
879CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000880><A
881NAME="AEN20729"
882></A
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000883><P
884></P
885><TABLE
886BORDER="0"
887WIDTH="100%"
888BGCOLOR="#FFD0D0"
889CELLSPACING="0"
890CELLPADDING="4"
891CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000892><TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000893><TR
894><TD
895WIDTH="20%"
896ALIGN="RIGHT"
897VALIGN="TOP"
898><TT
899CLASS="PARAMETER"
900><I
901>handler</I
902></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000903>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000904><TD
905WIDTH="80%"
906ALIGN="LEFT"
907VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000908> the xmlCharEncodingHandlerPtr handler block</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000909></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000910></TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000911></TABLE
912><P
913></P
914></DIV
915></DIV
916><HR><DIV
917CLASS="REFSECT2"
918><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000919NAME="AEN20738"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000920></A
921><H3
922><A
923NAME="XMLGETCHARENCODINGHANDLER"
924></A
925>xmlGetCharEncodingHandler ()</H3
926><TABLE
927BORDER="0"
928BGCOLOR="#D6E8FF"
929WIDTH="100%"
930CELLPADDING="6"
931><TR
932><TD
933><PRE
934CLASS="PROGRAMLISTING"
935><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000936HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000937>xmlCharEncodingHandlerPtr</A
938> xmlGetCharEncodingHandler
939 (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000940HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000941>xmlCharEncoding</A
942> enc);</PRE
943></TD
944></TR
945></TABLE
946><P
947>Search in the registrered set the handler able to read/write that encoding.</P
948><P
949></P
950><DIV
951CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000952><A
953NAME="AEN20746"
954></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000955><P
956></P
957><TABLE
958BORDER="0"
959WIDTH="100%"
960BGCOLOR="#FFD0D0"
961CELLSPACING="0"
962CELLPADDING="4"
963CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000964><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000965><TR
966><TD
967WIDTH="20%"
968ALIGN="RIGHT"
969VALIGN="TOP"
970><TT
971CLASS="PARAMETER"
972><I
973>enc</I
974></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000975>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000976><TD
977WIDTH="80%"
978ALIGN="LEFT"
979VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000980> a string describing the char encoding.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000981></TR
982><TR
983><TD
984WIDTH="20%"
985ALIGN="RIGHT"
986VALIGN="TOP"
987><I
988CLASS="EMPHASIS"
989>Returns</I
990> :</TD
991><TD
992WIDTH="80%"
993ALIGN="LEFT"
994VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000995>the handler or NULL if not found</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000996></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000997></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000998></TABLE
999><P
1000></P
1001></DIV
1002></DIV
1003><HR><DIV
1004CLASS="REFSECT2"
1005><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001006NAME="AEN20759"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001007></A
1008><H3
1009><A
1010NAME="XMLFINDCHARENCODINGHANDLER"
1011></A
1012>xmlFindCharEncodingHandler ()</H3
1013><TABLE
1014BORDER="0"
1015BGCOLOR="#D6E8FF"
1016WIDTH="100%"
1017CELLPADDING="6"
1018><TR
1019><TD
1020><PRE
1021CLASS="PROGRAMLISTING"
1022><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001023HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001024>xmlCharEncodingHandlerPtr</A
1025> xmlFindCharEncodingHandler
1026 (const char *name);</PRE
1027></TD
1028></TR
1029></TABLE
1030><P
1031></P
1032><DIV
1033CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001034><A
1035NAME="AEN20765"
1036></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001037><P
1038></P
1039><TABLE
1040BORDER="0"
1041WIDTH="100%"
1042BGCOLOR="#FFD0D0"
1043CELLSPACING="0"
1044CELLPADDING="4"
1045CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001046><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001047><TR
1048><TD
1049WIDTH="20%"
1050ALIGN="RIGHT"
1051VALIGN="TOP"
1052><TT
1053CLASS="PARAMETER"
1054><I
1055>name</I
1056></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001057>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001058><TD
1059WIDTH="80%"
1060ALIGN="LEFT"
1061VALIGN="TOP"
1062>&nbsp;</TD
1063></TR
1064><TR
1065><TD
1066WIDTH="20%"
1067ALIGN="RIGHT"
1068VALIGN="TOP"
1069><I
1070CLASS="EMPHASIS"
1071>Returns</I
1072> :</TD
1073><TD
1074WIDTH="80%"
1075ALIGN="LEFT"
1076VALIGN="TOP"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001077>&nbsp;</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001078></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001079></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001080></TABLE
1081><P
1082></P
1083></DIV
1084></DIV
1085><HR><DIV
1086CLASS="REFSECT2"
1087><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001088NAME="AEN20778"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001089></A
1090><H3
1091><A
1092NAME="XMLADDENCODINGALIAS"
1093></A
1094>xmlAddEncodingAlias ()</H3
1095><TABLE
1096BORDER="0"
1097BGCOLOR="#D6E8FF"
1098WIDTH="100%"
1099CELLPADDING="6"
1100><TR
1101><TD
1102><PRE
1103CLASS="PROGRAMLISTING"
1104>int xmlAddEncodingAlias (const char *name,
1105 const char *alias);</PRE
1106></TD
1107></TR
1108></TABLE
1109><P
1110>Registers and alias <TT
1111CLASS="PARAMETER"
1112><I
1113>alias</I
1114></TT
1115> for an encoding named <TT
1116CLASS="PARAMETER"
1117><I
1118>name</I
1119></TT
1120>. Existing alias
1121will be overwritten.</P
1122><P
1123></P
1124><DIV
1125CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001126><A
1127NAME="AEN20786"
1128></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001129><P
1130></P
1131><TABLE
1132BORDER="0"
1133WIDTH="100%"
1134BGCOLOR="#FFD0D0"
1135CELLSPACING="0"
1136CELLPADDING="4"
1137CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001138><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001139><TR
1140><TD
1141WIDTH="20%"
1142ALIGN="RIGHT"
1143VALIGN="TOP"
1144><TT
1145CLASS="PARAMETER"
1146><I
1147>name</I
1148></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001149>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001150><TD
1151WIDTH="80%"
1152ALIGN="LEFT"
1153VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001154> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001155></TR
1156><TR
1157><TD
1158WIDTH="20%"
1159ALIGN="RIGHT"
1160VALIGN="TOP"
1161><TT
1162CLASS="PARAMETER"
1163><I
1164>alias</I
1165></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001166>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001167><TD
1168WIDTH="80%"
1169ALIGN="LEFT"
1170VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001171> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001172></TR
1173><TR
1174><TD
1175WIDTH="20%"
1176ALIGN="RIGHT"
1177VALIGN="TOP"
1178><I
1179CLASS="EMPHASIS"
1180>Returns</I
1181> :</TD
1182><TD
1183WIDTH="80%"
1184ALIGN="LEFT"
1185VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001186>0 in case of success, -1 in case of error</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001187></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001188></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001189></TABLE
1190><P
1191></P
1192></DIV
1193></DIV
1194><HR><DIV
1195CLASS="REFSECT2"
1196><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001197NAME="AEN20803"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001198></A
1199><H3
1200><A
1201NAME="XMLDELENCODINGALIAS"
1202></A
1203>xmlDelEncodingAlias ()</H3
1204><TABLE
1205BORDER="0"
1206BGCOLOR="#D6E8FF"
1207WIDTH="100%"
1208CELLPADDING="6"
1209><TR
1210><TD
1211><PRE
1212CLASS="PROGRAMLISTING"
1213>int xmlDelEncodingAlias (const char *alias);</PRE
1214></TD
1215></TR
1216></TABLE
1217><P
1218>Unregisters an encoding alias <TT
1219CLASS="PARAMETER"
1220><I
1221>alias</I
1222></TT
1223></P
1224><P
1225></P
1226><DIV
1227CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001228><A
1229NAME="AEN20810"
1230></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001231><P
1232></P
1233><TABLE
1234BORDER="0"
1235WIDTH="100%"
1236BGCOLOR="#FFD0D0"
1237CELLSPACING="0"
1238CELLPADDING="4"
1239CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001240><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001241><TR
1242><TD
1243WIDTH="20%"
1244ALIGN="RIGHT"
1245VALIGN="TOP"
1246><TT
1247CLASS="PARAMETER"
1248><I
1249>alias</I
1250></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001251>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001252><TD
1253WIDTH="80%"
1254ALIGN="LEFT"
1255VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001256> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001257></TR
1258><TR
1259><TD
1260WIDTH="20%"
1261ALIGN="RIGHT"
1262VALIGN="TOP"
1263><I
1264CLASS="EMPHASIS"
1265>Returns</I
1266> :</TD
1267><TD
1268WIDTH="80%"
1269ALIGN="LEFT"
1270VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001271>0 in case of success, -1 in case of error</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001272></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001273></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001274></TABLE
1275><P
1276></P
1277></DIV
1278></DIV
1279><HR><DIV
1280CLASS="REFSECT2"
1281><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001282NAME="AEN20823"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001283></A
1284><H3
1285><A
1286NAME="XMLGETENCODINGALIAS"
1287></A
1288>xmlGetEncodingAlias ()</H3
1289><TABLE
1290BORDER="0"
1291BGCOLOR="#D6E8FF"
1292WIDTH="100%"
1293CELLPADDING="6"
1294><TR
1295><TD
1296><PRE
1297CLASS="PROGRAMLISTING"
1298>const char* xmlGetEncodingAlias (const char *alias);</PRE
1299></TD
1300></TR
1301></TABLE
1302><P
1303>Lookup an encoding name for the given alias.</P
1304><P
1305></P
1306><DIV
1307CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001308><A
1309NAME="AEN20829"
1310></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001311><P
1312></P
1313><TABLE
1314BORDER="0"
1315WIDTH="100%"
1316BGCOLOR="#FFD0D0"
1317CELLSPACING="0"
1318CELLPADDING="4"
1319CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001320><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001321><TR
1322><TD
1323WIDTH="20%"
1324ALIGN="RIGHT"
1325VALIGN="TOP"
1326><TT
1327CLASS="PARAMETER"
1328><I
1329>alias</I
1330></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001331>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001332><TD
1333WIDTH="80%"
1334ALIGN="LEFT"
1335VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001336> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001337></TR
1338><TR
1339><TD
1340WIDTH="20%"
1341ALIGN="RIGHT"
1342VALIGN="TOP"
1343><I
1344CLASS="EMPHASIS"
1345>Returns</I
1346> :</TD
1347><TD
1348WIDTH="80%"
1349ALIGN="LEFT"
1350VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001351>NULL if not found the original name otherwise</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001352></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001353></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001354></TABLE
1355><P
1356></P
1357></DIV
1358></DIV
1359><HR><DIV
1360CLASS="REFSECT2"
1361><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001362NAME="AEN20842"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001363></A
1364><H3
1365><A
1366NAME="XMLCLEANUPENCODINGALIASES"
1367></A
1368>xmlCleanupEncodingAliases ()</H3
1369><TABLE
1370BORDER="0"
1371BGCOLOR="#D6E8FF"
1372WIDTH="100%"
1373CELLPADDING="6"
1374><TR
1375><TD
1376><PRE
1377CLASS="PROGRAMLISTING"
1378>void xmlCleanupEncodingAliases (void);</PRE
1379></TD
1380></TR
1381></TABLE
1382><P
1383>Unregisters all aliases</P
1384><P
1385></P
1386></DIV
1387><HR><DIV
1388CLASS="REFSECT2"
1389><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001390NAME="AEN20848"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001391></A
1392><H3
1393><A
1394NAME="XMLPARSECHARENCODING"
1395></A
1396>xmlParseCharEncoding ()</H3
1397><TABLE
1398BORDER="0"
1399BGCOLOR="#D6E8FF"
1400WIDTH="100%"
1401CELLPADDING="6"
1402><TR
1403><TD
1404><PRE
1405CLASS="PROGRAMLISTING"
1406><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001407HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001408>xmlCharEncoding</A
1409> xmlParseCharEncoding (const char *name);</PRE
1410></TD
1411></TR
1412></TABLE
1413><P
1414>Conpare the string to the known encoding schemes already known. Note
1415that the comparison is case insensitive accordingly to the section
1416[XML] 4.3.3 Character Encoding in Entities.</P
1417><P
1418></P
1419><DIV
1420CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001421><A
1422NAME="AEN20855"
1423></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001424><P
1425></P
1426><TABLE
1427BORDER="0"
1428WIDTH="100%"
1429BGCOLOR="#FFD0D0"
1430CELLSPACING="0"
1431CELLPADDING="4"
1432CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001433><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001434><TR
1435><TD
1436WIDTH="20%"
1437ALIGN="RIGHT"
1438VALIGN="TOP"
1439><TT
1440CLASS="PARAMETER"
1441><I
1442>name</I
1443></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001444>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001445><TD
1446WIDTH="80%"
1447ALIGN="LEFT"
1448VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001449> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001450></TR
1451><TR
1452><TD
1453WIDTH="20%"
1454ALIGN="RIGHT"
1455VALIGN="TOP"
1456><I
1457CLASS="EMPHASIS"
1458>Returns</I
1459> :</TD
1460><TD
1461WIDTH="80%"
1462ALIGN="LEFT"
1463VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001464>one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE
1465if not recognized.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001466></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001467></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001468></TABLE
1469><P
1470></P
1471></DIV
1472></DIV
1473><HR><DIV
1474CLASS="REFSECT2"
1475><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001476NAME="AEN20868"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001477></A
1478><H3
1479><A
1480NAME="XMLGETCHARENCODINGNAME"
1481></A
1482>xmlGetCharEncodingName ()</H3
1483><TABLE
1484BORDER="0"
1485BGCOLOR="#D6E8FF"
1486WIDTH="100%"
1487CELLPADDING="6"
1488><TR
1489><TD
1490><PRE
1491CLASS="PROGRAMLISTING"
1492>const char* xmlGetCharEncodingName (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001493HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001494>xmlCharEncoding</A
1495> enc);</PRE
1496></TD
1497></TR
1498></TABLE
1499><P
1500>The "canonical" name for XML encoding.
1501C.f. http://www.w3.org/TR/REC-xml<GTKDOCLINK
1502HREF="CHARENCODING"
1503>charencoding</GTKDOCLINK
1504>
1505Section 4.3.3 Character Encoding in Entities</P
1506><P
1507></P
1508><DIV
1509CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001510><A
1511NAME="AEN20876"
1512></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001513><P
1514></P
1515><TABLE
1516BORDER="0"
1517WIDTH="100%"
1518BGCOLOR="#FFD0D0"
1519CELLSPACING="0"
1520CELLPADDING="4"
1521CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001522><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001523><TR
1524><TD
1525WIDTH="20%"
1526ALIGN="RIGHT"
1527VALIGN="TOP"
1528><TT
1529CLASS="PARAMETER"
1530><I
1531>enc</I
1532></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001533>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001534><TD
1535WIDTH="80%"
1536ALIGN="LEFT"
1537VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001538> the encoding</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001539></TR
1540><TR
1541><TD
1542WIDTH="20%"
1543ALIGN="RIGHT"
1544VALIGN="TOP"
1545><I
1546CLASS="EMPHASIS"
1547>Returns</I
1548> :</TD
1549><TD
1550WIDTH="80%"
1551ALIGN="LEFT"
1552VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001553>the canonical name for the given encoding</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001554></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001555></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001556></TABLE
1557><P
1558></P
1559></DIV
1560></DIV
1561><HR><DIV
1562CLASS="REFSECT2"
1563><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001564NAME="AEN20889"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001565></A
1566><H3
1567><A
1568NAME="XMLDETECTCHARENCODING"
1569></A
1570>xmlDetectCharEncoding ()</H3
1571><TABLE
1572BORDER="0"
1573BGCOLOR="#D6E8FF"
1574WIDTH="100%"
1575CELLPADDING="6"
1576><TR
1577><TD
1578><PRE
1579CLASS="PROGRAMLISTING"
1580><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001581HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001582>xmlCharEncoding</A
1583> xmlDetectCharEncoding (unsigned char *in,
1584 int len);</PRE
1585></TD
1586></TR
1587></TABLE
1588><P
1589>Guess the encoding of the entity using the first bytes of the entity content
1590accordingly of the non-normative appendix F of the XML-1.0 recommendation.</P
1591><P
1592></P
1593><DIV
1594CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001595><A
1596NAME="AEN20896"
1597></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001598><P
1599></P
1600><TABLE
1601BORDER="0"
1602WIDTH="100%"
1603BGCOLOR="#FFD0D0"
1604CELLSPACING="0"
1605CELLPADDING="4"
1606CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001607><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001608><TR
1609><TD
1610WIDTH="20%"
1611ALIGN="RIGHT"
1612VALIGN="TOP"
1613><TT
1614CLASS="PARAMETER"
1615><I
1616>in</I
1617></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001618>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001619><TD
1620WIDTH="80%"
1621ALIGN="LEFT"
1622VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001623> a pointer to the first bytes of the XML entity, must be at least
16244 bytes long.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001625></TR
1626><TR
1627><TD
1628WIDTH="20%"
1629ALIGN="RIGHT"
1630VALIGN="TOP"
1631><TT
1632CLASS="PARAMETER"
1633><I
1634>len</I
1635></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001636>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001637><TD
1638WIDTH="80%"
1639ALIGN="LEFT"
1640VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001641> pointer to the length of the buffer</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001642></TR
1643><TR
1644><TD
1645WIDTH="20%"
1646ALIGN="RIGHT"
1647VALIGN="TOP"
1648><I
1649CLASS="EMPHASIS"
1650>Returns</I
1651> :</TD
1652><TD
1653WIDTH="80%"
1654ALIGN="LEFT"
1655VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001656>one of the XML_CHAR_ENCODING_... values.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001657></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001658></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001659></TABLE
1660><P
1661></P
1662></DIV
1663></DIV
1664><HR><DIV
1665CLASS="REFSECT2"
1666><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001667NAME="AEN20913"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001668></A
1669><H3
1670><A
1671NAME="XMLCHARENCOUTFUNC"
1672></A
1673>xmlCharEncOutFunc ()</H3
1674><TABLE
1675BORDER="0"
1676BGCOLOR="#D6E8FF"
1677WIDTH="100%"
1678CELLPADDING="6"
1679><TR
1680><TD
1681><PRE
1682CLASS="PROGRAMLISTING"
1683>int xmlCharEncOutFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001684HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001685>xmlCharEncodingHandler</A
1686> *handler,
1687 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001688HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001689>xmlBufferPtr</A
1690> out,
1691 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001692HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001693>xmlBufferPtr</A
1694> in);</PRE
1695></TD
1696></TR
1697></TABLE
1698><P
1699>Generic front-end for the encoding handler output function
1700a first call with <TT
1701CLASS="PARAMETER"
1702><I
1703>in</I
1704></TT
1705> == NULL has to be made firs to initiate the
1706output in case of non-stateless encoding needing to initiate their
1707state or the output (like the BOM in UTF16).
1708In case of UTF8 sequence conversion errors for the given encoder,
1709the content will be automatically remapped to a CharRef sequence.</P
1710><P
1711></P
1712><DIV
1713CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001714><A
1715NAME="AEN20923"
1716></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001717><P
1718></P
1719><TABLE
1720BORDER="0"
1721WIDTH="100%"
1722BGCOLOR="#FFD0D0"
1723CELLSPACING="0"
1724CELLPADDING="4"
1725CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001726><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001727><TR
1728><TD
1729WIDTH="20%"
1730ALIGN="RIGHT"
1731VALIGN="TOP"
1732><TT
1733CLASS="PARAMETER"
1734><I
1735>handler</I
1736></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001737>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001738><TD
1739WIDTH="80%"
1740ALIGN="LEFT"
1741VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001742> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001743></TR
1744><TR
1745><TD
1746WIDTH="20%"
1747ALIGN="RIGHT"
1748VALIGN="TOP"
1749><TT
1750CLASS="PARAMETER"
1751><I
1752>out</I
1753></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001754>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001755><TD
1756WIDTH="80%"
1757ALIGN="LEFT"
1758VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001759> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001760></TR
1761><TR
1762><TD
1763WIDTH="20%"
1764ALIGN="RIGHT"
1765VALIGN="TOP"
1766><TT
1767CLASS="PARAMETER"
1768><I
Daniel Veillard06047432000-04-24 11:33:38 +00001769>in</I
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001770></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001771>&nbsp;:</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001772><TD
1773WIDTH="80%"
1774ALIGN="LEFT"
1775VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001776> an xmlBuffer for the input</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001777></TR
1778><TR
1779><TD
1780WIDTH="20%"
1781ALIGN="RIGHT"
1782VALIGN="TOP"
1783><I
1784CLASS="EMPHASIS"
1785>Returns</I
1786> :</TD
1787><TD
1788WIDTH="80%"
1789ALIGN="LEFT"
1790VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001791>the number of byte written if success, or
1792-1 general error
1793-2 if the transcoding fails (for *in is not valid utf8 string or
1794the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001795></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001796></TBODY
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001797></TABLE
1798><P
1799></P
1800></DIV
1801></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00001802><HR><DIV
1803CLASS="REFSECT2"
1804><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001805NAME="AEN20944"
Daniel Veillard06047432000-04-24 11:33:38 +00001806></A
1807><H3
1808><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001809NAME="XMLCHARENCINFUNC"
Daniel Veillard06047432000-04-24 11:33:38 +00001810></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001811>xmlCharEncInFunc ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001812><TABLE
1813BORDER="0"
1814BGCOLOR="#D6E8FF"
1815WIDTH="100%"
1816CELLPADDING="6"
1817><TR
1818><TD
1819><PRE
1820CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001821>int xmlCharEncInFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001822HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001823>xmlCharEncodingHandler</A
1824> *handler,
1825 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001826HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001827>xmlBufferPtr</A
1828> out,
1829 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001830HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001831>xmlBufferPtr</A
1832> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001833></TD
1834></TR
1835></TABLE
1836><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001837>Generic front-end for the encoding handler input function</P
Daniel Veillard06047432000-04-24 11:33:38 +00001838><P
1839></P
1840><DIV
1841CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001842><A
1843NAME="AEN20953"
1844></A
Daniel Veillard06047432000-04-24 11:33:38 +00001845><P
1846></P
1847><TABLE
1848BORDER="0"
1849WIDTH="100%"
1850BGCOLOR="#FFD0D0"
1851CELLSPACING="0"
1852CELLPADDING="4"
1853CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001854><TBODY
Daniel Veillard06047432000-04-24 11:33:38 +00001855><TR
1856><TD
1857WIDTH="20%"
1858ALIGN="RIGHT"
1859VALIGN="TOP"
1860><TT
1861CLASS="PARAMETER"
1862><I
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001863>handler</I
Daniel Veillard06047432000-04-24 11:33:38 +00001864></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001865>&nbsp;:</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001866><TD
1867WIDTH="80%"
1868ALIGN="LEFT"
1869VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001870> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001871></TR
1872><TR
1873><TD
1874WIDTH="20%"
1875ALIGN="RIGHT"
1876VALIGN="TOP"
1877><TT
1878CLASS="PARAMETER"
1879><I
1880>out</I
1881></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001882>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001883><TD
1884WIDTH="80%"
1885ALIGN="LEFT"
1886VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001887> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001888></TR
1889><TR
1890><TD
1891WIDTH="20%"
1892ALIGN="RIGHT"
1893VALIGN="TOP"
1894><TT
1895CLASS="PARAMETER"
1896><I
1897>in</I
1898></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001899>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001900><TD
1901WIDTH="80%"
1902ALIGN="LEFT"
1903VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001904> an xmlBuffer for the input</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001905></TR
1906><TR
1907><TD
1908WIDTH="20%"
1909ALIGN="RIGHT"
1910VALIGN="TOP"
1911><I
1912CLASS="EMPHASIS"
1913>Returns</I
1914> :</TD
1915><TD
1916WIDTH="80%"
1917ALIGN="LEFT"
1918VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001919>the number of byte written if success, or
1920-1 general error
1921-2 if the transcoding fails (for *in is not valid utf8 string or
1922the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001923></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001924></TBODY
Daniel Veillard06047432000-04-24 11:33:38 +00001925></TABLE
1926><P
1927></P
1928></DIV
1929></DIV
1930><HR><DIV
1931CLASS="REFSECT2"
1932><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001933NAME="AEN20974"
Daniel Veillard06047432000-04-24 11:33:38 +00001934></A
1935><H3
1936><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001937NAME="XMLCHARENCFIRSTLINE"
Daniel Veillard06047432000-04-24 11:33:38 +00001938></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001939>xmlCharEncFirstLine ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001940><TABLE
1941BORDER="0"
1942BGCOLOR="#D6E8FF"
1943WIDTH="100%"
1944CELLPADDING="6"
1945><TR
1946><TD
1947><PRE
1948CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001949>int xmlCharEncFirstLine (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001950HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001951>xmlCharEncodingHandler</A
1952> *handler,
1953 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001954HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001955>xmlBufferPtr</A
1956> out,
1957 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001958HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001959>xmlBufferPtr</A
1960> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001961></TD
1962></TR
1963></TABLE
1964><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001965>Front-end for the encoding handler input function, but handle only
1966the very first line, i.e. limit itself to 45 chars.</P
Daniel Veillard06047432000-04-24 11:33:38 +00001967><P
1968></P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001969><DIV
1970CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001971><A
1972NAME="AEN20983"
1973></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001974><P
1975></P
1976><TABLE
1977BORDER="0"
1978WIDTH="100%"
1979BGCOLOR="#FFD0D0"
1980CELLSPACING="0"
1981CELLPADDING="4"
1982CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001983><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001984><TR
1985><TD
1986WIDTH="20%"
1987ALIGN="RIGHT"
1988VALIGN="TOP"
1989><TT
1990CLASS="PARAMETER"
1991><I
1992>handler</I
1993></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001994>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001995><TD
1996WIDTH="80%"
1997ALIGN="LEFT"
1998VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001999> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002000></TR
2001><TR
2002><TD
2003WIDTH="20%"
2004ALIGN="RIGHT"
2005VALIGN="TOP"
2006><TT
2007CLASS="PARAMETER"
2008><I
2009>out</I
2010></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002011>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002012><TD
2013WIDTH="80%"
2014ALIGN="LEFT"
2015VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002016> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002017></TR
2018><TR
2019><TD
2020WIDTH="20%"
2021ALIGN="RIGHT"
2022VALIGN="TOP"
2023><TT
2024CLASS="PARAMETER"
2025><I
2026>in</I
2027></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002028>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002029><TD
2030WIDTH="80%"
2031ALIGN="LEFT"
2032VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002033> an xmlBuffer for the input</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002034></TR
2035><TR
2036><TD
2037WIDTH="20%"
2038ALIGN="RIGHT"
2039VALIGN="TOP"
2040><I
2041CLASS="EMPHASIS"
2042>Returns</I
2043> :</TD
2044><TD
2045WIDTH="80%"
2046ALIGN="LEFT"
2047VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002048>the number of byte written if success, or
2049-1 general error
2050-2 if the transcoding fails (for *in is not valid utf8 string or
2051the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002052></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002053></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002054></TABLE
2055><P
2056></P
2057></DIV
2058></DIV
2059><HR><DIV
2060CLASS="REFSECT2"
2061><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00002062NAME="AEN21004"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002063></A
2064><H3
2065><A
2066NAME="XMLCHARENCCLOSEFUNC"
2067></A
2068>xmlCharEncCloseFunc ()</H3
2069><TABLE
2070BORDER="0"
2071BGCOLOR="#D6E8FF"
2072WIDTH="100%"
2073CELLPADDING="6"
2074><TR
2075><TD
2076><PRE
2077CLASS="PROGRAMLISTING"
2078>int xmlCharEncCloseFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002079HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002080>xmlCharEncodingHandler</A
2081> *handler);</PRE
2082></TD
2083></TR
2084></TABLE
2085><P
2086>Generic front-end for hencoding handler close function</P
2087><P
2088></P
2089><DIV
2090CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002091><A
2092NAME="AEN21011"
2093></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002094><P
2095></P
2096><TABLE
2097BORDER="0"
2098WIDTH="100%"
2099BGCOLOR="#FFD0D0"
2100CELLSPACING="0"
2101CELLPADDING="4"
2102CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002103><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002104><TR
2105><TD
2106WIDTH="20%"
2107ALIGN="RIGHT"
2108VALIGN="TOP"
2109><TT
2110CLASS="PARAMETER"
2111><I
2112>handler</I
2113></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002114>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002115><TD
2116WIDTH="80%"
2117ALIGN="LEFT"
2118VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002119> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002120></TR
2121><TR
2122><TD
2123WIDTH="20%"
2124ALIGN="RIGHT"
2125VALIGN="TOP"
2126><I
2127CLASS="EMPHASIS"
2128>Returns</I
2129> :</TD
2130><TD
2131WIDTH="80%"
2132ALIGN="LEFT"
2133VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002134>0 if success, or -1 in case of error</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002135></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002136></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002137></TABLE
2138><P
2139></P
2140></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00002141></DIV
Daniel Veillarda41123c2001-04-22 19:31:20 +00002142><HR><DIV
2143CLASS="REFSECT2"
2144><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00002145NAME="AEN21024"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002146></A
2147><H3
2148><A
2149NAME="UTF8TOISOLAT1"
2150></A
2151>UTF8Toisolat1 ()</H3
2152><TABLE
2153BORDER="0"
2154BGCOLOR="#D6E8FF"
2155WIDTH="100%"
2156CELLPADDING="6"
2157><TR
2158><TD
2159><PRE
2160CLASS="PROGRAMLISTING"
2161>int UTF8Toisolat1 (unsigned char *out,
2162 int *outlen,
2163 unsigned char *in,
2164 int *inlen);</PRE
2165></TD
2166></TR
2167></TABLE
2168><P
2169>Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1
2170block of chars out.</P
2171><P
2172></P
2173><DIV
2174CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002175><A
2176NAME="AEN21030"
2177></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00002178><P
2179></P
2180><TABLE
2181BORDER="0"
2182WIDTH="100%"
2183BGCOLOR="#FFD0D0"
2184CELLSPACING="0"
2185CELLPADDING="4"
2186CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002187><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002188><TR
2189><TD
2190WIDTH="20%"
2191ALIGN="RIGHT"
2192VALIGN="TOP"
2193><TT
2194CLASS="PARAMETER"
2195><I
2196>out</I
2197></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002198>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002199><TD
2200WIDTH="80%"
2201ALIGN="LEFT"
2202VALIGN="TOP"
2203> a pointer to an array of bytes to store the result</TD
2204></TR
2205><TR
2206><TD
2207WIDTH="20%"
2208ALIGN="RIGHT"
2209VALIGN="TOP"
2210><TT
2211CLASS="PARAMETER"
2212><I
2213>outlen</I
2214></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002215>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002216><TD
2217WIDTH="80%"
2218ALIGN="LEFT"
2219VALIGN="TOP"
2220> the length of <TT
2221CLASS="PARAMETER"
2222><I
2223>out</I
2224></TT
2225></TD
2226></TR
2227><TR
2228><TD
2229WIDTH="20%"
2230ALIGN="RIGHT"
2231VALIGN="TOP"
2232><TT
2233CLASS="PARAMETER"
2234><I
2235>in</I
2236></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002237>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002238><TD
2239WIDTH="80%"
2240ALIGN="LEFT"
2241VALIGN="TOP"
2242> a pointer to an array of UTF-8 chars</TD
2243></TR
2244><TR
2245><TD
2246WIDTH="20%"
2247ALIGN="RIGHT"
2248VALIGN="TOP"
2249><TT
2250CLASS="PARAMETER"
2251><I
2252>inlen</I
2253></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002254>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002255><TD
2256WIDTH="80%"
2257ALIGN="LEFT"
2258VALIGN="TOP"
2259> the length of <TT
2260CLASS="PARAMETER"
2261><I
2262>in</I
2263></TT
2264></TD
2265></TR
2266><TR
2267><TD
2268WIDTH="20%"
2269ALIGN="RIGHT"
2270VALIGN="TOP"
2271><I
2272CLASS="EMPHASIS"
2273>Returns</I
2274> :</TD
2275><TD
2276WIDTH="80%"
2277ALIGN="LEFT"
2278VALIGN="TOP"
2279>0 if success, -2 if the transcoding fails, or -1 otherwise
2280The value of <TT
2281CLASS="PARAMETER"
2282><I
2283>inlen</I
2284></TT
2285> after return is the number of octets consumed
2286as the return value is positive, else unpredictiable.
2287The value of <TT
2288CLASS="PARAMETER"
2289><I
2290>outlen</I
2291></TT
2292> after return is the number of ocetes consumed.</TD
2293></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002294></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002295></TABLE
2296><P
2297></P
2298></DIV
2299></DIV
2300><HR><DIV
2301CLASS="REFSECT2"
2302><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00002303NAME="AEN21059"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002304></A
2305><H3
2306><A
2307NAME="ISOLAT1TOUTF8"
2308></A
2309>isolat1ToUTF8 ()</H3
2310><TABLE
2311BORDER="0"
2312BGCOLOR="#D6E8FF"
2313WIDTH="100%"
2314CELLPADDING="6"
2315><TR
2316><TD
2317><PRE
2318CLASS="PROGRAMLISTING"
2319>int isolat1ToUTF8 (unsigned char *out,
2320 int *outlen,
2321 unsigned char *in,
2322 int *inlen);</PRE
2323></TD
2324></TR
2325></TABLE
2326><P
2327>Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8
2328block of chars out.</P
2329><P
2330></P
2331><DIV
2332CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002333><A
2334NAME="AEN21065"
2335></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00002336><P
2337></P
2338><TABLE
2339BORDER="0"
2340WIDTH="100%"
2341BGCOLOR="#FFD0D0"
2342CELLSPACING="0"
2343CELLPADDING="4"
2344CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002345><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002346><TR
2347><TD
2348WIDTH="20%"
2349ALIGN="RIGHT"
2350VALIGN="TOP"
2351><TT
2352CLASS="PARAMETER"
2353><I
2354>out</I
2355></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002356>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002357><TD
2358WIDTH="80%"
2359ALIGN="LEFT"
2360VALIGN="TOP"
2361> a pointer to an array of bytes to store the result</TD
2362></TR
2363><TR
2364><TD
2365WIDTH="20%"
2366ALIGN="RIGHT"
2367VALIGN="TOP"
2368><TT
2369CLASS="PARAMETER"
2370><I
2371>outlen</I
2372></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002373>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002374><TD
2375WIDTH="80%"
2376ALIGN="LEFT"
2377VALIGN="TOP"
2378> the length of <TT
2379CLASS="PARAMETER"
2380><I
2381>out</I
2382></TT
2383></TD
2384></TR
2385><TR
2386><TD
2387WIDTH="20%"
2388ALIGN="RIGHT"
2389VALIGN="TOP"
2390><TT
2391CLASS="PARAMETER"
2392><I
2393>in</I
2394></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002395>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002396><TD
2397WIDTH="80%"
2398ALIGN="LEFT"
2399VALIGN="TOP"
2400> a pointer to an array of ISO Latin 1 chars</TD
2401></TR
2402><TR
2403><TD
2404WIDTH="20%"
2405ALIGN="RIGHT"
2406VALIGN="TOP"
2407><TT
2408CLASS="PARAMETER"
2409><I
2410>inlen</I
2411></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002412>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002413><TD
2414WIDTH="80%"
2415ALIGN="LEFT"
2416VALIGN="TOP"
2417> the length of <TT
2418CLASS="PARAMETER"
2419><I
2420>in</I
2421></TT
2422></TD
2423></TR
2424><TR
2425><TD
2426WIDTH="20%"
2427ALIGN="RIGHT"
2428VALIGN="TOP"
2429><I
2430CLASS="EMPHASIS"
2431>Returns</I
2432> :</TD
2433><TD
2434WIDTH="80%"
2435ALIGN="LEFT"
2436VALIGN="TOP"
2437>0 if success, or -1 otherwise
2438The value of <TT
2439CLASS="PARAMETER"
2440><I
2441>inlen</I
2442></TT
2443> after return is the number of octets consumed
2444as the return value is positive, else unpredictiable.
2445The value of <TT
2446CLASS="PARAMETER"
2447><I
2448>outlen</I
2449></TT
2450> after return is the number of ocetes consumed.</TD
2451></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002452></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002453></TABLE
2454><P
2455></P
2456></DIV
2457></DIV
2458><HR><DIV
2459CLASS="REFSECT2"
2460><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00002461NAME="AEN21094"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002462></A
2463><H3
2464><A
2465NAME="XMLCHECKUTF8"
2466></A
2467>xmlCheckUTF8 ()</H3
2468><TABLE
2469BORDER="0"
2470BGCOLOR="#D6E8FF"
2471WIDTH="100%"
2472CELLPADDING="6"
2473><TR
2474><TD
2475><PRE
2476CLASS="PROGRAMLISTING"
2477>int xmlCheckUTF8 (unsigned char *utf);</PRE
2478></TD
2479></TR
2480></TABLE
2481><P
2482>Checks <TT
2483CLASS="PARAMETER"
2484><I
2485>utf</I
2486></TT
2487> for being valid utf-8. <TT
2488CLASS="PARAMETER"
2489><I
2490>utf</I
2491></TT
2492> is assumed to be
2493null-terminated. This function is not super-strict, as it will
2494allow longer utf-8 sequences than necessary. Note that Java is
2495capable of producing these sequences if provoked. Also note, this
2496routine checks for the 4-byte maxiumum size, but does not check for
24970x10ffff maximum value.</P
2498><P
2499></P
2500><DIV
2501CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002502><A
2503NAME="AEN21102"
2504></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00002505><P
2506></P
2507><TABLE
2508BORDER="0"
2509WIDTH="100%"
2510BGCOLOR="#FFD0D0"
2511CELLSPACING="0"
2512CELLPADDING="4"
2513CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002514><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002515><TR
2516><TD
2517WIDTH="20%"
2518ALIGN="RIGHT"
2519VALIGN="TOP"
2520><TT
2521CLASS="PARAMETER"
2522><I
2523>utf</I
2524></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002525>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002526><TD
2527WIDTH="80%"
2528ALIGN="LEFT"
2529VALIGN="TOP"
2530> Pointer to putative utf-8 encoded string.</TD
2531></TR
2532><TR
2533><TD
2534WIDTH="20%"
2535ALIGN="RIGHT"
2536VALIGN="TOP"
2537><I
2538CLASS="EMPHASIS"
2539>Returns</I
2540> :</TD
2541><TD
2542WIDTH="80%"
2543ALIGN="LEFT"
2544VALIGN="TOP"
2545> true if <TT
2546CLASS="PARAMETER"
2547><I
2548>utf</I
2549></TT
2550> is valid.</TD
2551></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002552></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002553></TABLE
2554><P
2555></P
2556></DIV
2557></DIV
2558><HR><DIV
2559CLASS="REFSECT2"
2560><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00002561NAME="AEN21116"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002562></A
2563><H3
2564><A
2565NAME="XMLUTF8STRLEN"
2566></A
2567>xmlUTF8Strlen ()</H3
2568><TABLE
2569BORDER="0"
2570BGCOLOR="#D6E8FF"
2571WIDTH="100%"
2572CELLPADDING="6"
2573><TR
2574><TD
2575><PRE
2576CLASS="PROGRAMLISTING"
2577>int xmlUTF8Strlen (unsigned char *utf);</PRE
2578></TD
2579></TR
2580></TABLE
2581><P
2582>compute the lenght of an UTF8 string, it doesn't do a full UTF8
2583checking of the content of the string.</P
2584><P
2585></P
2586><DIV
2587CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002588><A
2589NAME="AEN21122"
2590></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00002591><P
2592></P
2593><TABLE
2594BORDER="0"
2595WIDTH="100%"
2596BGCOLOR="#FFD0D0"
2597CELLSPACING="0"
2598CELLPADDING="4"
2599CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002600><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002601><TR
2602><TD
2603WIDTH="20%"
2604ALIGN="RIGHT"
2605VALIGN="TOP"
2606><TT
2607CLASS="PARAMETER"
2608><I
2609>utf</I
2610></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002611>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002612><TD
2613WIDTH="80%"
2614ALIGN="LEFT"
2615VALIGN="TOP"
2616> a sequence of UTF-8 encoded bytes</TD
2617></TR
2618><TR
2619><TD
2620WIDTH="20%"
2621ALIGN="RIGHT"
2622VALIGN="TOP"
2623><I
2624CLASS="EMPHASIS"
2625>Returns</I
2626> :</TD
2627><TD
2628WIDTH="80%"
2629ALIGN="LEFT"
2630VALIGN="TOP"
2631>the number of characters in the string or -1 in case of error</TD
2632></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002633></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002634></TABLE
2635><P
2636></P
2637></DIV
2638></DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +00002639></DIV
2640><DIV
2641CLASS="NAVFOOTER"
2642><BR
2643CLEAR="all"><BR><TABLE
2644WIDTH="100%"
2645BORDER="0"
2646BGCOLOR="#000000"
2647CELLPADDING="1"
2648CELLSPACING="0"
2649><TR
2650><TD
2651WIDTH="25%"
2652BGCOLOR="#C00000"
2653ALIGN="left"
2654><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002655HREF="libxml-parserinternals.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00002656><FONT
2657COLOR="#FFFFFF"
2658SIZE="3"
2659><B
2660>&#60;&#60;&#60; Previous Page</B
2661></FONT
2662></A
2663></TD
2664><TD
2665WIDTH="25%"
2666BGCOLOR="#0000C0"
2667ALIGN="center"
2668><FONT
2669COLOR="#FFFFFF"
2670SIZE="3"
2671><B
2672><A
2673HREF="book1.html"
2674><FONT
2675COLOR="#FFFFFF"
2676SIZE="3"
2677><B
2678>Home</B
2679></FONT
2680></A
2681></B
2682></FONT
2683></TD
2684><TD
2685WIDTH="25%"
2686BGCOLOR="#00C000"
2687ALIGN="center"
2688><FONT
2689COLOR="#FFFFFF"
2690SIZE="3"
2691><B
2692><A
2693HREF="libxml-lib.html"
2694><FONT
2695COLOR="#FFFFFF"
2696SIZE="3"
2697><B
2698>Up</B
2699></FONT
2700></A
2701></B
2702></FONT
2703></TD
2704><TD
2705WIDTH="25%"
2706BGCOLOR="#C00000"
2707ALIGN="right"
2708><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002709HREF="libxml-debugxml.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00002710><FONT
2711COLOR="#FFFFFF"
2712SIZE="3"
2713><B
2714>Next Page &#62;&#62;&#62;</B
2715></FONT
2716></A
2717></TD
2718></TR
2719><TR
2720><TD
2721COLSPAN="2"
2722ALIGN="left"
2723><FONT
2724COLOR="#FFFFFF"
2725SIZE="3"
2726><B
2727>parserInternals</B
2728></FONT
2729></TD
2730><TD
2731COLSPAN="2"
2732ALIGN="right"
2733><FONT
2734COLOR="#FFFFFF"
2735SIZE="3"
2736><B
2737>debugXML</B
2738></FONT
2739></TD
2740></TR
2741></TABLE
2742></DIV
2743></BODY
2744></HTML
2745>