blob: 7319454c2a85dee73266a519f8297a61f2c1b83c [file] [log] [blame]
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001<HTML
2><HEAD
3><TITLE
4>encoding</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillard503b8932001-01-05 06:36:31 +00007CONTENT="Modular DocBook HTML Stylesheet Version 1.44"><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
21BGCOLOR="#FFFFFF"
22TEXT="#000000"
Daniel Veillard503b8932001-01-05 06:36:31 +000023LINK="#0000FF"
24VLINK="#840084"
25ALINK="#0000FF"
Daniel Veillardaeea04f2000-01-25 19:27:27 +000026><DIV
27CLASS="NAVHEADER"
28><TABLE
29WIDTH="100%"
30BORDER="0"
31BGCOLOR="#000000"
32CELLPADDING="1"
33CELLSPACING="0"
34><TR
35><TH
36COLSPAN="4"
37ALIGN="center"
38><FONT
39COLOR="#FFFFFF"
40SIZE="5"
41>Gnome XML Library Reference Manual</FONT
42></TH
43></TR
44><TR
45><TD
46WIDTH="25%"
47BGCOLOR="#C00000"
48ALIGN="left"
49><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000050HREF="libxml-parserinternals.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +000051><FONT
52COLOR="#FFFFFF"
53SIZE="3"
54><B
55>&#60;&#60;&#60; Previous Page</B
56></FONT
57></A
58></TD
59><TD
60WIDTH="25%"
61BGCOLOR="#0000C0"
62ALIGN="center"
63><FONT
64COLOR="#FFFFFF"
65SIZE="3"
66><B
67><A
68HREF="book1.html"
69><FONT
70COLOR="#FFFFFF"
71SIZE="3"
72><B
73>Home</B
74></FONT
75></A
76></B
77></FONT
78></TD
79><TD
80WIDTH="25%"
81BGCOLOR="#00C000"
82ALIGN="center"
83><FONT
84COLOR="#FFFFFF"
85SIZE="3"
86><B
87><A
88HREF="libxml-lib.html"
89><FONT
90COLOR="#FFFFFF"
91SIZE="3"
92><B
93>Up</B
94></FONT
95></A
96></B
97></FONT
98></TD
99><TD
100WIDTH="25%"
101BGCOLOR="#C00000"
102ALIGN="right"
103><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000104HREF="libxml-debugxml.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000105><FONT
106COLOR="#FFFFFF"
107SIZE="3"
108><B
109>Next Page &#62;&#62;&#62;</B
110></FONT
111></A
112></TD
113></TR
114></TABLE
115></DIV
116><H1
Daniel Veillard503b8932001-01-05 06:36:31 +0000117><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000118NAME="LIBXML-ENCODING"
Daniel Veillard503b8932001-01-05 06:36:31 +0000119>encoding</A
120></H1
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000121><DIV
122CLASS="REFNAMEDIV"
123><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000124NAME="AEN20000"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000125></A
126><H2
127>Name</H2
Daniel Veillard503b8932001-01-05 06:36:31 +0000128>encoding&nbsp;--&nbsp;</DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000129><DIV
130CLASS="REFSYNOPSISDIV"
131><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000132NAME="AEN20003"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000133></A
134><H2
135>Synopsis</H2
136><TABLE
137BORDER="0"
138BGCOLOR="#D6E8FF"
139WIDTH="100%"
140CELLPADDING="6"
141><TR
142><TD
143><PRE
144CLASS="SYNOPSIS"
145>&#13;
146
147enum <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000148HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000149>xmlCharEncoding</A
150>;
151int (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000152HREF="libxml-encoding.html#XMLCHARENCODINGINPUTFUNC"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000153>*xmlCharEncodingInputFunc</A
154>) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000155 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000156 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000157 int *inlen);
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000158int (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000159HREF="libxml-encoding.html#XMLCHARENCODINGOUTPUTFUNC"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000160>*xmlCharEncodingOutputFunc</A
161>) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000162 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000163 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000164 int *inlen);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000165struct <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000166HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000167>xmlCharEncodingHandler</A
168>;
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000169typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000170HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000171>xmlCharEncodingHandlerPtr</A
172>;
173void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000174HREF="libxml-encoding.html#XMLINITCHARENCODINGHANDLERS"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000175>xmlInitCharEncodingHandlers</A
176> (void);
177void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000178HREF="libxml-encoding.html#XMLCLEANUPCHARENCODINGHANDLERS"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000179>xmlCleanupCharEncodingHandlers</A
180> (void);
181void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000182HREF="libxml-encoding.html#XMLREGISTERCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000183>xmlRegisterCharEncodingHandler</A
184> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000185HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000186>xmlCharEncodingHandlerPtr</A
187> handler);
188<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000189HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000190>xmlCharEncodingHandlerPtr</A
191> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000192HREF="libxml-encoding.html#XMLGETCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000193>xmlGetCharEncodingHandler</A
194>
195 (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000196HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000197>xmlCharEncoding</A
198> enc);
199<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000200HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000201>xmlCharEncodingHandlerPtr</A
202> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000203HREF="libxml-encoding.html#XMLFINDCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000204>xmlFindCharEncodingHandler</A
205>
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000206 (const char *name);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000207int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000208HREF="libxml-encoding.html#XMLADDENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000209>xmlAddEncodingAlias</A
210> (const char *name,
211 const char *alias);
212int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000213HREF="libxml-encoding.html#XMLDELENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000214>xmlDelEncodingAlias</A
215> (const char *alias);
216const char* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000217HREF="libxml-encoding.html#XMLGETENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000218>xmlGetEncodingAlias</A
219> (const char *alias);
220void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000221HREF="libxml-encoding.html#XMLCLEANUPENCODINGALIASES"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000222>xmlCleanupEncodingAliases</A
223> (void);
224<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000225HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000226>xmlCharEncoding</A
227> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000228HREF="libxml-encoding.html#XMLPARSECHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000229>xmlParseCharEncoding</A
230> (const char *name);
231const char* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000232HREF="libxml-encoding.html#XMLGETCHARENCODINGNAME"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000233>xmlGetCharEncodingName</A
234> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000235HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000236>xmlCharEncoding</A
237> enc);
238<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000239HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000240>xmlCharEncoding</A
241> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000242HREF="libxml-encoding.html#XMLDETECTCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000243>xmlDetectCharEncoding</A
244> (unsigned char *in,
245 int len);
246int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000247HREF="libxml-encoding.html#XMLCHARENCOUTFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000248>xmlCharEncOutFunc</A
249> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000250HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000251>xmlCharEncodingHandler</A
252> *handler,
253 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000254HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000255>xmlBufferPtr</A
256> out,
257 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000258HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000259>xmlBufferPtr</A
260> in);
261int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000262HREF="libxml-encoding.html#XMLCHARENCINFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000263>xmlCharEncInFunc</A
264> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000265HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000266>xmlCharEncodingHandler</A
267> *handler,
268 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000269HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000270>xmlBufferPtr</A
271> out,
272 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000273HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000274>xmlBufferPtr</A
275> in);
276int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000277HREF="libxml-encoding.html#XMLCHARENCFIRSTLINE"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000278>xmlCharEncFirstLine</A
279> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000280HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000281>xmlCharEncodingHandler</A
282> *handler,
283 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000284HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000285>xmlBufferPtr</A
286> out,
287 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000288HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000289>xmlBufferPtr</A
290> in);
291int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000292HREF="libxml-encoding.html#XMLCHARENCCLOSEFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000293>xmlCharEncCloseFunc</A
294> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000295HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000296>xmlCharEncodingHandler</A
Daniel Veillarda41123c2001-04-22 19:31:20 +0000297> *handler);
298int <A
299HREF="libxml-encoding.html#UTF8TOISOLAT1"
300>UTF8Toisolat1</A
301> (unsigned char *out,
302 int *outlen,
303 unsigned char *in,
304 int *inlen);
305int <A
306HREF="libxml-encoding.html#ISOLAT1TOUTF8"
307>isolat1ToUTF8</A
308> (unsigned char *out,
309 int *outlen,
310 unsigned char *in,
311 int *inlen);
312int <A
313HREF="libxml-encoding.html#XMLCHECKUTF8"
314>xmlCheckUTF8</A
315> (unsigned char *utf);
316int <A
317HREF="libxml-encoding.html#XMLUTF8STRLEN"
318>xmlUTF8Strlen</A
319> (unsigned char *utf);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000320></TD
321></TR
322></TABLE
323></DIV
324><DIV
325CLASS="REFSECT1"
326><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000327NAME="AEN20048"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000328></A
329><H2
330>Description</H2
331><P
332></P
333></DIV
334><DIV
335CLASS="REFSECT1"
336><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000337NAME="AEN20051"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000338></A
339><H2
340>Details</H2
341><DIV
342CLASS="REFSECT2"
343><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000344NAME="AEN20053"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000345></A
346><H3
347><A
348NAME="XMLCHARENCODING"
349></A
350>enum xmlCharEncoding</H3
351><TABLE
352BORDER="0"
353BGCOLOR="#D6E8FF"
354WIDTH="100%"
355CELLPADDING="6"
356><TR
357><TD
358><PRE
359CLASS="PROGRAMLISTING"
360>typedef enum {
361 XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
362 XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
363 XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
364 XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
365 XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
366 XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
367 XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
368 XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
369 XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
370 XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
371 XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
372 XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
373 XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
374 XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
375 XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
376 XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
377 XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
378 XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
379 XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
380 XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
381 XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
382 XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
Daniel Veillarde46e20d2000-07-14 15:02:46 +0000383 XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
384 XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000385} xmlCharEncoding;</PRE
386></TD
387></TR
388></TABLE
389><P
390></P
391></DIV
392><HR><DIV
393CLASS="REFSECT2"
394><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000395NAME="AEN20058"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000396></A
397><H3
398><A
399NAME="XMLCHARENCODINGINPUTFUNC"
400></A
401>xmlCharEncodingInputFunc ()</H3
402><TABLE
403BORDER="0"
404BGCOLOR="#D6E8FF"
405WIDTH="100%"
406CELLPADDING="6"
407><TR
408><TD
409><PRE
410CLASS="PROGRAMLISTING"
411>int (*xmlCharEncodingInputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000412 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000413 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000414 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000415></TD
416></TR
417></TABLE
418><P
419></P
420><DIV
421CLASS="INFORMALTABLE"
422><P
423></P
424><TABLE
425BORDER="0"
426WIDTH="100%"
427BGCOLOR="#FFD0D0"
428CELLSPACING="0"
429CELLPADDING="4"
430CLASS="CALSTABLE"
431><TR
432><TD
433WIDTH="20%"
434ALIGN="RIGHT"
435VALIGN="TOP"
436><TT
437CLASS="PARAMETER"
438><I
439>out</I
440></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000441>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000442><TD
443WIDTH="80%"
444ALIGN="LEFT"
445VALIGN="TOP"
446>&nbsp;</TD
447></TR
448><TR
449><TD
450WIDTH="20%"
451ALIGN="RIGHT"
452VALIGN="TOP"
453><TT
454CLASS="PARAMETER"
455><I
456>outlen</I
457></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000458>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000459><TD
460WIDTH="80%"
461ALIGN="LEFT"
462VALIGN="TOP"
463>&nbsp;</TD
464></TR
465><TR
466><TD
467WIDTH="20%"
468ALIGN="RIGHT"
469VALIGN="TOP"
470><TT
471CLASS="PARAMETER"
472><I
473>in</I
474></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000475>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000476><TD
477WIDTH="80%"
478ALIGN="LEFT"
479VALIGN="TOP"
480>&nbsp;</TD
481></TR
482><TR
483><TD
484WIDTH="20%"
485ALIGN="RIGHT"
486VALIGN="TOP"
487><TT
488CLASS="PARAMETER"
489><I
490>inlen</I
491></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000492>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000493><TD
494WIDTH="80%"
495ALIGN="LEFT"
496VALIGN="TOP"
497>&nbsp;</TD
498></TR
499><TR
500><TD
501WIDTH="20%"
502ALIGN="RIGHT"
503VALIGN="TOP"
504><I
505CLASS="EMPHASIS"
506>Returns</I
507> :</TD
508><TD
509WIDTH="80%"
510ALIGN="LEFT"
511VALIGN="TOP"
Daniel Veillard503b8932001-01-05 06:36:31 +0000512>&#13;</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000513></TR
514></TABLE
515><P
516></P
517></DIV
518></DIV
519><HR><DIV
520CLASS="REFSECT2"
521><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000522NAME="AEN20088"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000523></A
524><H3
525><A
526NAME="XMLCHARENCODINGOUTPUTFUNC"
527></A
528>xmlCharEncodingOutputFunc ()</H3
529><TABLE
530BORDER="0"
531BGCOLOR="#D6E8FF"
532WIDTH="100%"
533CELLPADDING="6"
534><TR
535><TD
536><PRE
537CLASS="PROGRAMLISTING"
538>int (*xmlCharEncodingOutputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000539 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000540 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000541 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000542></TD
543></TR
544></TABLE
545><P
546></P
547><DIV
548CLASS="INFORMALTABLE"
549><P
550></P
551><TABLE
552BORDER="0"
553WIDTH="100%"
554BGCOLOR="#FFD0D0"
555CELLSPACING="0"
556CELLPADDING="4"
557CLASS="CALSTABLE"
558><TR
559><TD
560WIDTH="20%"
561ALIGN="RIGHT"
562VALIGN="TOP"
563><TT
564CLASS="PARAMETER"
565><I
566>out</I
567></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000568>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000569><TD
570WIDTH="80%"
571ALIGN="LEFT"
572VALIGN="TOP"
573>&nbsp;</TD
574></TR
575><TR
576><TD
577WIDTH="20%"
578ALIGN="RIGHT"
579VALIGN="TOP"
580><TT
581CLASS="PARAMETER"
582><I
583>outlen</I
584></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000585>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000586><TD
587WIDTH="80%"
588ALIGN="LEFT"
589VALIGN="TOP"
590>&nbsp;</TD
591></TR
592><TR
593><TD
594WIDTH="20%"
595ALIGN="RIGHT"
596VALIGN="TOP"
597><TT
598CLASS="PARAMETER"
599><I
600>in</I
601></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000602>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000603><TD
604WIDTH="80%"
605ALIGN="LEFT"
606VALIGN="TOP"
607>&nbsp;</TD
608></TR
609><TR
610><TD
611WIDTH="20%"
612ALIGN="RIGHT"
613VALIGN="TOP"
614><TT
615CLASS="PARAMETER"
616><I
617>inlen</I
618></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000619>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000620><TD
621WIDTH="80%"
622ALIGN="LEFT"
623VALIGN="TOP"
624>&nbsp;</TD
625></TR
626><TR
627><TD
628WIDTH="20%"
629ALIGN="RIGHT"
630VALIGN="TOP"
631><I
632CLASS="EMPHASIS"
633>Returns</I
634> :</TD
635><TD
636WIDTH="80%"
637ALIGN="LEFT"
638VALIGN="TOP"
Daniel Veillard503b8932001-01-05 06:36:31 +0000639>&#13;</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000640></TR
641></TABLE
642><P
643></P
644></DIV
645></DIV
646><HR><DIV
647CLASS="REFSECT2"
648><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000649NAME="AEN20118"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000650></A
651><H3
652><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000653NAME="XMLCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000654></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000655>struct xmlCharEncodingHandler</H3
656><TABLE
657BORDER="0"
658BGCOLOR="#D6E8FF"
659WIDTH="100%"
660CELLPADDING="6"
661><TR
662><TD
663><PRE
664CLASS="PROGRAMLISTING"
665>struct xmlCharEncodingHandler {
666 char *name;
667 xmlCharEncodingInputFunc input;
668 xmlCharEncodingOutputFunc output;
669#ifdef LIBXML_ICONV_ENABLED
670 iconv_t iconv_in;
671 iconv_t iconv_out;
672#endif /* LIBXML_ICONV_ENABLED */
673};</PRE
674></TD
675></TR
676></TABLE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000677><P
678></P
679></DIV
680><HR><DIV
681CLASS="REFSECT2"
682><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000683NAME="AEN20123"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000684></A
685><H3
686><A
687NAME="XMLCHARENCODINGHANDLERPTR"
688></A
689>xmlCharEncodingHandlerPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000690><TABLE
691BORDER="0"
692BGCOLOR="#D6E8FF"
693WIDTH="100%"
694CELLPADDING="6"
695><TR
696><TD
697><PRE
698CLASS="PROGRAMLISTING"
699>typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;</PRE
700></TD
701></TR
702></TABLE
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000703><P
704></P
705></DIV
706><HR><DIV
707CLASS="REFSECT2"
708><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000709NAME="AEN20128"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000710></A
711><H3
712><A
713NAME="XMLINITCHARENCODINGHANDLERS"
714></A
715>xmlInitCharEncodingHandlers ()</H3
716><TABLE
717BORDER="0"
718BGCOLOR="#D6E8FF"
719WIDTH="100%"
720CELLPADDING="6"
721><TR
722><TD
723><PRE
724CLASS="PROGRAMLISTING"
725>void xmlInitCharEncodingHandlers (void);</PRE
726></TD
727></TR
728></TABLE
729><P
730>Initialize the char encoding support, it registers the default
731encoding supported.
732NOTE: while public, this function usually doesn't need to be called
733in normal processing.</P
734><P
735></P
736></DIV
737><HR><DIV
738CLASS="REFSECT2"
739><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000740NAME="AEN20134"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000741></A
742><H3
743><A
744NAME="XMLCLEANUPCHARENCODINGHANDLERS"
745></A
746>xmlCleanupCharEncodingHandlers ()</H3
747><TABLE
748BORDER="0"
749BGCOLOR="#D6E8FF"
750WIDTH="100%"
751CELLPADDING="6"
752><TR
753><TD
754><PRE
755CLASS="PROGRAMLISTING"
756>void xmlCleanupCharEncodingHandlers (void);</PRE
757></TD
758></TR
759></TABLE
760><P
761>Cleanup the memory allocated for the char encoding support, it
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000762unregisters all the encoding handlers and the aliases.</P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000763><P
764></P
765></DIV
766><HR><DIV
767CLASS="REFSECT2"
768><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000769NAME="AEN20140"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000770></A
771><H3
772><A
773NAME="XMLREGISTERCHARENCODINGHANDLER"
774></A
775>xmlRegisterCharEncodingHandler ()</H3
776><TABLE
777BORDER="0"
778BGCOLOR="#D6E8FF"
779WIDTH="100%"
780CELLPADDING="6"
781><TR
782><TD
783><PRE
784CLASS="PROGRAMLISTING"
785>void xmlRegisterCharEncodingHandler (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000786HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000787>xmlCharEncodingHandlerPtr</A
788> handler);</PRE
789></TD
790></TR
791></TABLE
792><P
793>Register the char encoding handler, surprizing, isn't it ?</P
794><P
795></P
796><DIV
797CLASS="INFORMALTABLE"
798><P
799></P
800><TABLE
801BORDER="0"
802WIDTH="100%"
803BGCOLOR="#FFD0D0"
804CELLSPACING="0"
805CELLPADDING="4"
806CLASS="CALSTABLE"
807><TR
808><TD
809WIDTH="20%"
810ALIGN="RIGHT"
811VALIGN="TOP"
812><TT
813CLASS="PARAMETER"
814><I
815>handler</I
816></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000817>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000818><TD
819WIDTH="80%"
820ALIGN="LEFT"
821VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000822> the xmlCharEncodingHandlerPtr handler block</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000823></TR
824></TABLE
825><P
826></P
827></DIV
828></DIV
829><HR><DIV
830CLASS="REFSECT2"
831><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000832NAME="AEN20156"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000833></A
834><H3
835><A
836NAME="XMLGETCHARENCODINGHANDLER"
837></A
838>xmlGetCharEncodingHandler ()</H3
839><TABLE
840BORDER="0"
841BGCOLOR="#D6E8FF"
842WIDTH="100%"
843CELLPADDING="6"
844><TR
845><TD
846><PRE
847CLASS="PROGRAMLISTING"
848><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000849HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000850>xmlCharEncodingHandlerPtr</A
851> xmlGetCharEncodingHandler
852 (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000853HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000854>xmlCharEncoding</A
855> enc);</PRE
856></TD
857></TR
858></TABLE
859><P
860>Search in the registrered set the handler able to read/write that encoding.</P
861><P
862></P
863><DIV
864CLASS="INFORMALTABLE"
865><P
866></P
867><TABLE
868BORDER="0"
869WIDTH="100%"
870BGCOLOR="#FFD0D0"
871CELLSPACING="0"
872CELLPADDING="4"
873CLASS="CALSTABLE"
874><TR
875><TD
876WIDTH="20%"
877ALIGN="RIGHT"
878VALIGN="TOP"
879><TT
880CLASS="PARAMETER"
881><I
882>enc</I
883></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000884>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000885><TD
886WIDTH="80%"
887ALIGN="LEFT"
888VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000889> a string describing the char encoding.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000890></TR
891><TR
892><TD
893WIDTH="20%"
894ALIGN="RIGHT"
895VALIGN="TOP"
896><I
897CLASS="EMPHASIS"
898>Returns</I
899> :</TD
900><TD
901WIDTH="80%"
902ALIGN="LEFT"
903VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000904>the handler or NULL if not found</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000905></TR
906></TABLE
907><P
908></P
909></DIV
910></DIV
911><HR><DIV
912CLASS="REFSECT2"
913><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000914NAME="AEN20177"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000915></A
916><H3
917><A
918NAME="XMLFINDCHARENCODINGHANDLER"
919></A
920>xmlFindCharEncodingHandler ()</H3
921><TABLE
922BORDER="0"
923BGCOLOR="#D6E8FF"
924WIDTH="100%"
925CELLPADDING="6"
926><TR
927><TD
928><PRE
929CLASS="PROGRAMLISTING"
930><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000931HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000932>xmlCharEncodingHandlerPtr</A
933> xmlFindCharEncodingHandler
934 (const char *name);</PRE
935></TD
936></TR
937></TABLE
938><P
939></P
940><DIV
941CLASS="INFORMALTABLE"
942><P
943></P
944><TABLE
945BORDER="0"
946WIDTH="100%"
947BGCOLOR="#FFD0D0"
948CELLSPACING="0"
949CELLPADDING="4"
950CLASS="CALSTABLE"
951><TR
952><TD
953WIDTH="20%"
954ALIGN="RIGHT"
955VALIGN="TOP"
956><TT
957CLASS="PARAMETER"
958><I
959>name</I
960></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000961>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000962><TD
963WIDTH="80%"
964ALIGN="LEFT"
965VALIGN="TOP"
966>&nbsp;</TD
967></TR
968><TR
969><TD
970WIDTH="20%"
971ALIGN="RIGHT"
972VALIGN="TOP"
973><I
974CLASS="EMPHASIS"
975>Returns</I
976> :</TD
977><TD
978WIDTH="80%"
979ALIGN="LEFT"
980VALIGN="TOP"
Daniel Veillard503b8932001-01-05 06:36:31 +0000981>&#13;</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000982></TR
983></TABLE
984><P
985></P
986></DIV
987></DIV
988><HR><DIV
989CLASS="REFSECT2"
990><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +0000991NAME="AEN20196"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000992></A
993><H3
994><A
995NAME="XMLADDENCODINGALIAS"
996></A
997>xmlAddEncodingAlias ()</H3
998><TABLE
999BORDER="0"
1000BGCOLOR="#D6E8FF"
1001WIDTH="100%"
1002CELLPADDING="6"
1003><TR
1004><TD
1005><PRE
1006CLASS="PROGRAMLISTING"
1007>int xmlAddEncodingAlias (const char *name,
1008 const char *alias);</PRE
1009></TD
1010></TR
1011></TABLE
1012><P
1013>Registers and alias <TT
1014CLASS="PARAMETER"
1015><I
1016>alias</I
1017></TT
1018> for an encoding named <TT
1019CLASS="PARAMETER"
1020><I
1021>name</I
1022></TT
1023>. Existing alias
1024will be overwritten.</P
1025><P
1026></P
1027><DIV
1028CLASS="INFORMALTABLE"
1029><P
1030></P
1031><TABLE
1032BORDER="0"
1033WIDTH="100%"
1034BGCOLOR="#FFD0D0"
1035CELLSPACING="0"
1036CELLPADDING="4"
1037CLASS="CALSTABLE"
1038><TR
1039><TD
1040WIDTH="20%"
1041ALIGN="RIGHT"
1042VALIGN="TOP"
1043><TT
1044CLASS="PARAMETER"
1045><I
1046>name</I
1047></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001048>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001049><TD
1050WIDTH="80%"
1051ALIGN="LEFT"
1052VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001053> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001054></TR
1055><TR
1056><TD
1057WIDTH="20%"
1058ALIGN="RIGHT"
1059VALIGN="TOP"
1060><TT
1061CLASS="PARAMETER"
1062><I
1063>alias</I
1064></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001065>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001066><TD
1067WIDTH="80%"
1068ALIGN="LEFT"
1069VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001070> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001071></TR
1072><TR
1073><TD
1074WIDTH="20%"
1075ALIGN="RIGHT"
1076VALIGN="TOP"
1077><I
1078CLASS="EMPHASIS"
1079>Returns</I
1080> :</TD
1081><TD
1082WIDTH="80%"
1083ALIGN="LEFT"
1084VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001085>0 in case of success, -1 in case of error</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001086></TR
1087></TABLE
1088><P
1089></P
1090></DIV
1091></DIV
1092><HR><DIV
1093CLASS="REFSECT2"
1094><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001095NAME="AEN20221"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001096></A
1097><H3
1098><A
1099NAME="XMLDELENCODINGALIAS"
1100></A
1101>xmlDelEncodingAlias ()</H3
1102><TABLE
1103BORDER="0"
1104BGCOLOR="#D6E8FF"
1105WIDTH="100%"
1106CELLPADDING="6"
1107><TR
1108><TD
1109><PRE
1110CLASS="PROGRAMLISTING"
1111>int xmlDelEncodingAlias (const char *alias);</PRE
1112></TD
1113></TR
1114></TABLE
1115><P
1116>Unregisters an encoding alias <TT
1117CLASS="PARAMETER"
1118><I
1119>alias</I
1120></TT
1121></P
1122><P
1123></P
1124><DIV
1125CLASS="INFORMALTABLE"
1126><P
1127></P
1128><TABLE
1129BORDER="0"
1130WIDTH="100%"
1131BGCOLOR="#FFD0D0"
1132CELLSPACING="0"
1133CELLPADDING="4"
1134CLASS="CALSTABLE"
1135><TR
1136><TD
1137WIDTH="20%"
1138ALIGN="RIGHT"
1139VALIGN="TOP"
1140><TT
1141CLASS="PARAMETER"
1142><I
1143>alias</I
1144></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001145>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001146><TD
1147WIDTH="80%"
1148ALIGN="LEFT"
1149VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001150> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001151></TR
1152><TR
1153><TD
1154WIDTH="20%"
1155ALIGN="RIGHT"
1156VALIGN="TOP"
1157><I
1158CLASS="EMPHASIS"
1159>Returns</I
1160> :</TD
1161><TD
1162WIDTH="80%"
1163ALIGN="LEFT"
1164VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001165>0 in case of success, -1 in case of error</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001166></TR
1167></TABLE
1168><P
1169></P
1170></DIV
1171></DIV
1172><HR><DIV
1173CLASS="REFSECT2"
1174><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001175NAME="AEN20241"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001176></A
1177><H3
1178><A
1179NAME="XMLGETENCODINGALIAS"
1180></A
1181>xmlGetEncodingAlias ()</H3
1182><TABLE
1183BORDER="0"
1184BGCOLOR="#D6E8FF"
1185WIDTH="100%"
1186CELLPADDING="6"
1187><TR
1188><TD
1189><PRE
1190CLASS="PROGRAMLISTING"
1191>const char* xmlGetEncodingAlias (const char *alias);</PRE
1192></TD
1193></TR
1194></TABLE
1195><P
1196>Lookup an encoding name for the given alias.</P
1197><P
1198></P
1199><DIV
1200CLASS="INFORMALTABLE"
1201><P
1202></P
1203><TABLE
1204BORDER="0"
1205WIDTH="100%"
1206BGCOLOR="#FFD0D0"
1207CELLSPACING="0"
1208CELLPADDING="4"
1209CLASS="CALSTABLE"
1210><TR
1211><TD
1212WIDTH="20%"
1213ALIGN="RIGHT"
1214VALIGN="TOP"
1215><TT
1216CLASS="PARAMETER"
1217><I
1218>alias</I
1219></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001220>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001221><TD
1222WIDTH="80%"
1223ALIGN="LEFT"
1224VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001225> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001226></TR
1227><TR
1228><TD
1229WIDTH="20%"
1230ALIGN="RIGHT"
1231VALIGN="TOP"
1232><I
1233CLASS="EMPHASIS"
1234>Returns</I
1235> :</TD
1236><TD
1237WIDTH="80%"
1238ALIGN="LEFT"
1239VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001240>NULL if not found the original name otherwise</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001241></TR
1242></TABLE
1243><P
1244></P
1245></DIV
1246></DIV
1247><HR><DIV
1248CLASS="REFSECT2"
1249><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001250NAME="AEN20260"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001251></A
1252><H3
1253><A
1254NAME="XMLCLEANUPENCODINGALIASES"
1255></A
1256>xmlCleanupEncodingAliases ()</H3
1257><TABLE
1258BORDER="0"
1259BGCOLOR="#D6E8FF"
1260WIDTH="100%"
1261CELLPADDING="6"
1262><TR
1263><TD
1264><PRE
1265CLASS="PROGRAMLISTING"
1266>void xmlCleanupEncodingAliases (void);</PRE
1267></TD
1268></TR
1269></TABLE
1270><P
1271>Unregisters all aliases</P
1272><P
1273></P
1274></DIV
1275><HR><DIV
1276CLASS="REFSECT2"
1277><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001278NAME="AEN20266"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001279></A
1280><H3
1281><A
1282NAME="XMLPARSECHARENCODING"
1283></A
1284>xmlParseCharEncoding ()</H3
1285><TABLE
1286BORDER="0"
1287BGCOLOR="#D6E8FF"
1288WIDTH="100%"
1289CELLPADDING="6"
1290><TR
1291><TD
1292><PRE
1293CLASS="PROGRAMLISTING"
1294><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001295HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001296>xmlCharEncoding</A
1297> xmlParseCharEncoding (const char *name);</PRE
1298></TD
1299></TR
1300></TABLE
1301><P
1302>Conpare the string to the known encoding schemes already known. Note
1303that the comparison is case insensitive accordingly to the section
1304[XML] 4.3.3 Character Encoding in Entities.</P
1305><P
1306></P
1307><DIV
1308CLASS="INFORMALTABLE"
1309><P
1310></P
1311><TABLE
1312BORDER="0"
1313WIDTH="100%"
1314BGCOLOR="#FFD0D0"
1315CELLSPACING="0"
1316CELLPADDING="4"
1317CLASS="CALSTABLE"
1318><TR
1319><TD
1320WIDTH="20%"
1321ALIGN="RIGHT"
1322VALIGN="TOP"
1323><TT
1324CLASS="PARAMETER"
1325><I
1326>name</I
1327></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001328>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001329><TD
1330WIDTH="80%"
1331ALIGN="LEFT"
1332VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001333> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001334></TR
1335><TR
1336><TD
1337WIDTH="20%"
1338ALIGN="RIGHT"
1339VALIGN="TOP"
1340><I
1341CLASS="EMPHASIS"
1342>Returns</I
1343> :</TD
1344><TD
1345WIDTH="80%"
1346ALIGN="LEFT"
1347VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001348>one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE
1349if not recognized.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001350></TR
1351></TABLE
1352><P
1353></P
1354></DIV
1355></DIV
1356><HR><DIV
1357CLASS="REFSECT2"
1358><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001359NAME="AEN20286"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001360></A
1361><H3
1362><A
1363NAME="XMLGETCHARENCODINGNAME"
1364></A
1365>xmlGetCharEncodingName ()</H3
1366><TABLE
1367BORDER="0"
1368BGCOLOR="#D6E8FF"
1369WIDTH="100%"
1370CELLPADDING="6"
1371><TR
1372><TD
1373><PRE
1374CLASS="PROGRAMLISTING"
1375>const char* xmlGetCharEncodingName (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001376HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001377>xmlCharEncoding</A
1378> enc);</PRE
1379></TD
1380></TR
1381></TABLE
1382><P
1383>The "canonical" name for XML encoding.
1384C.f. http://www.w3.org/TR/REC-xml<GTKDOCLINK
1385HREF="CHARENCODING"
1386>charencoding</GTKDOCLINK
1387>
1388Section 4.3.3 Character Encoding in Entities</P
1389><P
1390></P
1391><DIV
1392CLASS="INFORMALTABLE"
1393><P
1394></P
1395><TABLE
1396BORDER="0"
1397WIDTH="100%"
1398BGCOLOR="#FFD0D0"
1399CELLSPACING="0"
1400CELLPADDING="4"
1401CLASS="CALSTABLE"
1402><TR
1403><TD
1404WIDTH="20%"
1405ALIGN="RIGHT"
1406VALIGN="TOP"
1407><TT
1408CLASS="PARAMETER"
1409><I
1410>enc</I
1411></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001412>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001413><TD
1414WIDTH="80%"
1415ALIGN="LEFT"
1416VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001417> the encoding</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001418></TR
1419><TR
1420><TD
1421WIDTH="20%"
1422ALIGN="RIGHT"
1423VALIGN="TOP"
1424><I
1425CLASS="EMPHASIS"
1426>Returns</I
1427> :</TD
1428><TD
1429WIDTH="80%"
1430ALIGN="LEFT"
1431VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001432>the canonical name for the given encoding</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001433></TR
1434></TABLE
1435><P
1436></P
1437></DIV
1438></DIV
1439><HR><DIV
1440CLASS="REFSECT2"
1441><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001442NAME="AEN20307"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001443></A
1444><H3
1445><A
1446NAME="XMLDETECTCHARENCODING"
1447></A
1448>xmlDetectCharEncoding ()</H3
1449><TABLE
1450BORDER="0"
1451BGCOLOR="#D6E8FF"
1452WIDTH="100%"
1453CELLPADDING="6"
1454><TR
1455><TD
1456><PRE
1457CLASS="PROGRAMLISTING"
1458><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001459HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001460>xmlCharEncoding</A
1461> xmlDetectCharEncoding (unsigned char *in,
1462 int len);</PRE
1463></TD
1464></TR
1465></TABLE
1466><P
1467>Guess the encoding of the entity using the first bytes of the entity content
1468accordingly of the non-normative appendix F of the XML-1.0 recommendation.</P
1469><P
1470></P
1471><DIV
1472CLASS="INFORMALTABLE"
1473><P
1474></P
1475><TABLE
1476BORDER="0"
1477WIDTH="100%"
1478BGCOLOR="#FFD0D0"
1479CELLSPACING="0"
1480CELLPADDING="4"
1481CLASS="CALSTABLE"
1482><TR
1483><TD
1484WIDTH="20%"
1485ALIGN="RIGHT"
1486VALIGN="TOP"
1487><TT
1488CLASS="PARAMETER"
1489><I
1490>in</I
1491></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001492>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001493><TD
1494WIDTH="80%"
1495ALIGN="LEFT"
1496VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001497> a pointer to the first bytes of the XML entity, must be at least
14984 bytes long.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001499></TR
1500><TR
1501><TD
1502WIDTH="20%"
1503ALIGN="RIGHT"
1504VALIGN="TOP"
1505><TT
1506CLASS="PARAMETER"
1507><I
1508>len</I
1509></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001510>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001511><TD
1512WIDTH="80%"
1513ALIGN="LEFT"
1514VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001515> pointer to the length of the buffer</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001516></TR
1517><TR
1518><TD
1519WIDTH="20%"
1520ALIGN="RIGHT"
1521VALIGN="TOP"
1522><I
1523CLASS="EMPHASIS"
1524>Returns</I
1525> :</TD
1526><TD
1527WIDTH="80%"
1528ALIGN="LEFT"
1529VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001530>one of the XML_CHAR_ENCODING_... values.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001531></TR
1532></TABLE
1533><P
1534></P
1535></DIV
1536></DIV
1537><HR><DIV
1538CLASS="REFSECT2"
1539><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001540NAME="AEN20331"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001541></A
1542><H3
1543><A
1544NAME="XMLCHARENCOUTFUNC"
1545></A
1546>xmlCharEncOutFunc ()</H3
1547><TABLE
1548BORDER="0"
1549BGCOLOR="#D6E8FF"
1550WIDTH="100%"
1551CELLPADDING="6"
1552><TR
1553><TD
1554><PRE
1555CLASS="PROGRAMLISTING"
1556>int xmlCharEncOutFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001557HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001558>xmlCharEncodingHandler</A
1559> *handler,
1560 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001561HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001562>xmlBufferPtr</A
1563> out,
1564 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001565HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001566>xmlBufferPtr</A
1567> in);</PRE
1568></TD
1569></TR
1570></TABLE
1571><P
1572>Generic front-end for the encoding handler output function
1573a first call with <TT
1574CLASS="PARAMETER"
1575><I
1576>in</I
1577></TT
1578> == NULL has to be made firs to initiate the
1579output in case of non-stateless encoding needing to initiate their
1580state or the output (like the BOM in UTF16).
1581In case of UTF8 sequence conversion errors for the given encoder,
1582the content will be automatically remapped to a CharRef sequence.</P
1583><P
1584></P
1585><DIV
1586CLASS="INFORMALTABLE"
1587><P
1588></P
1589><TABLE
1590BORDER="0"
1591WIDTH="100%"
1592BGCOLOR="#FFD0D0"
1593CELLSPACING="0"
1594CELLPADDING="4"
1595CLASS="CALSTABLE"
1596><TR
1597><TD
1598WIDTH="20%"
1599ALIGN="RIGHT"
1600VALIGN="TOP"
1601><TT
1602CLASS="PARAMETER"
1603><I
1604>handler</I
1605></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001606>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001607><TD
1608WIDTH="80%"
1609ALIGN="LEFT"
1610VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001611> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001612></TR
1613><TR
1614><TD
1615WIDTH="20%"
1616ALIGN="RIGHT"
1617VALIGN="TOP"
1618><TT
1619CLASS="PARAMETER"
1620><I
1621>out</I
1622></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001623>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001624><TD
1625WIDTH="80%"
1626ALIGN="LEFT"
1627VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001628> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001629></TR
1630><TR
1631><TD
1632WIDTH="20%"
1633ALIGN="RIGHT"
1634VALIGN="TOP"
1635><TT
1636CLASS="PARAMETER"
1637><I
Daniel Veillard06047432000-04-24 11:33:38 +00001638>in</I
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001639></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001640>&nbsp;:</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001641><TD
1642WIDTH="80%"
1643ALIGN="LEFT"
1644VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001645> an xmlBuffer for the input</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001646></TR
1647><TR
1648><TD
1649WIDTH="20%"
1650ALIGN="RIGHT"
1651VALIGN="TOP"
1652><I
1653CLASS="EMPHASIS"
1654>Returns</I
1655> :</TD
1656><TD
1657WIDTH="80%"
1658ALIGN="LEFT"
1659VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001660>the number of byte written if success, or
1661-1 general error
1662-2 if the transcoding fails (for *in is not valid utf8 string or
1663the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001664></TR
1665></TABLE
1666><P
1667></P
1668></DIV
1669></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00001670><HR><DIV
1671CLASS="REFSECT2"
1672><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001673NAME="AEN20362"
Daniel Veillard06047432000-04-24 11:33:38 +00001674></A
1675><H3
1676><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001677NAME="XMLCHARENCINFUNC"
Daniel Veillard06047432000-04-24 11:33:38 +00001678></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001679>xmlCharEncInFunc ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001680><TABLE
1681BORDER="0"
1682BGCOLOR="#D6E8FF"
1683WIDTH="100%"
1684CELLPADDING="6"
1685><TR
1686><TD
1687><PRE
1688CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001689>int xmlCharEncInFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001690HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001691>xmlCharEncodingHandler</A
1692> *handler,
1693 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001694HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001695>xmlBufferPtr</A
1696> out,
1697 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001698HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001699>xmlBufferPtr</A
1700> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001701></TD
1702></TR
1703></TABLE
1704><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001705>Generic front-end for the encoding handler input function</P
Daniel Veillard06047432000-04-24 11:33:38 +00001706><P
1707></P
1708><DIV
1709CLASS="INFORMALTABLE"
1710><P
1711></P
1712><TABLE
1713BORDER="0"
1714WIDTH="100%"
1715BGCOLOR="#FFD0D0"
1716CELLSPACING="0"
1717CELLPADDING="4"
1718CLASS="CALSTABLE"
1719><TR
1720><TD
1721WIDTH="20%"
1722ALIGN="RIGHT"
1723VALIGN="TOP"
1724><TT
1725CLASS="PARAMETER"
1726><I
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001727>handler</I
Daniel Veillard06047432000-04-24 11:33:38 +00001728></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001729>&nbsp;:</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001730><TD
1731WIDTH="80%"
1732ALIGN="LEFT"
1733VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001734> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001735></TR
1736><TR
1737><TD
1738WIDTH="20%"
1739ALIGN="RIGHT"
1740VALIGN="TOP"
1741><TT
1742CLASS="PARAMETER"
1743><I
1744>out</I
1745></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001746>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001747><TD
1748WIDTH="80%"
1749ALIGN="LEFT"
1750VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001751> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001752></TR
1753><TR
1754><TD
1755WIDTH="20%"
1756ALIGN="RIGHT"
1757VALIGN="TOP"
1758><TT
1759CLASS="PARAMETER"
1760><I
1761>in</I
1762></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001763>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001764><TD
1765WIDTH="80%"
1766ALIGN="LEFT"
1767VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001768> an xmlBuffer for the input</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001769></TR
1770><TR
1771><TD
1772WIDTH="20%"
1773ALIGN="RIGHT"
1774VALIGN="TOP"
1775><I
1776CLASS="EMPHASIS"
1777>Returns</I
1778> :</TD
1779><TD
1780WIDTH="80%"
1781ALIGN="LEFT"
1782VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001783>the number of byte written if success, or
1784-1 general error
1785-2 if the transcoding fails (for *in is not valid utf8 string or
1786the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001787></TR
1788></TABLE
1789><P
1790></P
1791></DIV
1792></DIV
1793><HR><DIV
1794CLASS="REFSECT2"
1795><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001796NAME="AEN20392"
Daniel Veillard06047432000-04-24 11:33:38 +00001797></A
1798><H3
1799><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001800NAME="XMLCHARENCFIRSTLINE"
Daniel Veillard06047432000-04-24 11:33:38 +00001801></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001802>xmlCharEncFirstLine ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001803><TABLE
1804BORDER="0"
1805BGCOLOR="#D6E8FF"
1806WIDTH="100%"
1807CELLPADDING="6"
1808><TR
1809><TD
1810><PRE
1811CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001812>int xmlCharEncFirstLine (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001813HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001814>xmlCharEncodingHandler</A
1815> *handler,
1816 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001817HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001818>xmlBufferPtr</A
1819> out,
1820 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001821HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001822>xmlBufferPtr</A
1823> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001824></TD
1825></TR
1826></TABLE
1827><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001828>Front-end for the encoding handler input function, but handle only
1829the very first line, i.e. limit itself to 45 chars.</P
Daniel Veillard06047432000-04-24 11:33:38 +00001830><P
1831></P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001832><DIV
1833CLASS="INFORMALTABLE"
1834><P
1835></P
1836><TABLE
1837BORDER="0"
1838WIDTH="100%"
1839BGCOLOR="#FFD0D0"
1840CELLSPACING="0"
1841CELLPADDING="4"
1842CLASS="CALSTABLE"
1843><TR
1844><TD
1845WIDTH="20%"
1846ALIGN="RIGHT"
1847VALIGN="TOP"
1848><TT
1849CLASS="PARAMETER"
1850><I
1851>handler</I
1852></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001853>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001854><TD
1855WIDTH="80%"
1856ALIGN="LEFT"
1857VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001858> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001859></TR
1860><TR
1861><TD
1862WIDTH="20%"
1863ALIGN="RIGHT"
1864VALIGN="TOP"
1865><TT
1866CLASS="PARAMETER"
1867><I
1868>out</I
1869></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001870>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001871><TD
1872WIDTH="80%"
1873ALIGN="LEFT"
1874VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001875> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001876></TR
1877><TR
1878><TD
1879WIDTH="20%"
1880ALIGN="RIGHT"
1881VALIGN="TOP"
1882><TT
1883CLASS="PARAMETER"
1884><I
1885>in</I
1886></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001887>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001888><TD
1889WIDTH="80%"
1890ALIGN="LEFT"
1891VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001892> an xmlBuffer for the input</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001893></TR
1894><TR
1895><TD
1896WIDTH="20%"
1897ALIGN="RIGHT"
1898VALIGN="TOP"
1899><I
1900CLASS="EMPHASIS"
1901>Returns</I
1902> :</TD
1903><TD
1904WIDTH="80%"
1905ALIGN="LEFT"
1906VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001907>the number of byte written if success, or
1908-1 general error
1909-2 if the transcoding fails (for *in is not valid utf8 string or
1910the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001911></TR
1912></TABLE
1913><P
1914></P
1915></DIV
1916></DIV
1917><HR><DIV
1918CLASS="REFSECT2"
1919><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001920NAME="AEN20422"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001921></A
1922><H3
1923><A
1924NAME="XMLCHARENCCLOSEFUNC"
1925></A
1926>xmlCharEncCloseFunc ()</H3
1927><TABLE
1928BORDER="0"
1929BGCOLOR="#D6E8FF"
1930WIDTH="100%"
1931CELLPADDING="6"
1932><TR
1933><TD
1934><PRE
1935CLASS="PROGRAMLISTING"
1936>int xmlCharEncCloseFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001937HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001938>xmlCharEncodingHandler</A
1939> *handler);</PRE
1940></TD
1941></TR
1942></TABLE
1943><P
1944>Generic front-end for hencoding handler close function</P
1945><P
1946></P
1947><DIV
1948CLASS="INFORMALTABLE"
1949><P
1950></P
1951><TABLE
1952BORDER="0"
1953WIDTH="100%"
1954BGCOLOR="#FFD0D0"
1955CELLSPACING="0"
1956CELLPADDING="4"
1957CLASS="CALSTABLE"
1958><TR
1959><TD
1960WIDTH="20%"
1961ALIGN="RIGHT"
1962VALIGN="TOP"
1963><TT
1964CLASS="PARAMETER"
1965><I
1966>handler</I
1967></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001968>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001969><TD
1970WIDTH="80%"
1971ALIGN="LEFT"
1972VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001973> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001974></TR
1975><TR
1976><TD
1977WIDTH="20%"
1978ALIGN="RIGHT"
1979VALIGN="TOP"
1980><I
1981CLASS="EMPHASIS"
1982>Returns</I
1983> :</TD
1984><TD
1985WIDTH="80%"
1986ALIGN="LEFT"
1987VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001988>0 if success, or -1 in case of error</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001989></TR
1990></TABLE
1991><P
1992></P
1993></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00001994></DIV
Daniel Veillarda41123c2001-04-22 19:31:20 +00001995><HR><DIV
1996CLASS="REFSECT2"
1997><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00001998NAME="AEN20442"
Daniel Veillarda41123c2001-04-22 19:31:20 +00001999></A
2000><H3
2001><A
2002NAME="UTF8TOISOLAT1"
2003></A
2004>UTF8Toisolat1 ()</H3
2005><TABLE
2006BORDER="0"
2007BGCOLOR="#D6E8FF"
2008WIDTH="100%"
2009CELLPADDING="6"
2010><TR
2011><TD
2012><PRE
2013CLASS="PROGRAMLISTING"
2014>int UTF8Toisolat1 (unsigned char *out,
2015 int *outlen,
2016 unsigned char *in,
2017 int *inlen);</PRE
2018></TD
2019></TR
2020></TABLE
2021><P
2022>Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1
2023block of chars out.</P
2024><P
2025></P
2026><DIV
2027CLASS="INFORMALTABLE"
2028><P
2029></P
2030><TABLE
2031BORDER="0"
2032WIDTH="100%"
2033BGCOLOR="#FFD0D0"
2034CELLSPACING="0"
2035CELLPADDING="4"
2036CLASS="CALSTABLE"
2037><TR
2038><TD
2039WIDTH="20%"
2040ALIGN="RIGHT"
2041VALIGN="TOP"
2042><TT
2043CLASS="PARAMETER"
2044><I
2045>out</I
2046></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002047>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002048><TD
2049WIDTH="80%"
2050ALIGN="LEFT"
2051VALIGN="TOP"
2052> a pointer to an array of bytes to store the result</TD
2053></TR
2054><TR
2055><TD
2056WIDTH="20%"
2057ALIGN="RIGHT"
2058VALIGN="TOP"
2059><TT
2060CLASS="PARAMETER"
2061><I
2062>outlen</I
2063></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002064>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002065><TD
2066WIDTH="80%"
2067ALIGN="LEFT"
2068VALIGN="TOP"
2069> the length of <TT
2070CLASS="PARAMETER"
2071><I
2072>out</I
2073></TT
2074></TD
2075></TR
2076><TR
2077><TD
2078WIDTH="20%"
2079ALIGN="RIGHT"
2080VALIGN="TOP"
2081><TT
2082CLASS="PARAMETER"
2083><I
2084>in</I
2085></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002086>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002087><TD
2088WIDTH="80%"
2089ALIGN="LEFT"
2090VALIGN="TOP"
2091> a pointer to an array of UTF-8 chars</TD
2092></TR
2093><TR
2094><TD
2095WIDTH="20%"
2096ALIGN="RIGHT"
2097VALIGN="TOP"
2098><TT
2099CLASS="PARAMETER"
2100><I
2101>inlen</I
2102></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002103>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002104><TD
2105WIDTH="80%"
2106ALIGN="LEFT"
2107VALIGN="TOP"
2108> the length of <TT
2109CLASS="PARAMETER"
2110><I
2111>in</I
2112></TT
2113></TD
2114></TR
2115><TR
2116><TD
2117WIDTH="20%"
2118ALIGN="RIGHT"
2119VALIGN="TOP"
2120><I
2121CLASS="EMPHASIS"
2122>Returns</I
2123> :</TD
2124><TD
2125WIDTH="80%"
2126ALIGN="LEFT"
2127VALIGN="TOP"
2128>0 if success, -2 if the transcoding fails, or -1 otherwise
2129The value of <TT
2130CLASS="PARAMETER"
2131><I
2132>inlen</I
2133></TT
2134> after return is the number of octets consumed
2135as the return value is positive, else unpredictiable.
2136The value of <TT
2137CLASS="PARAMETER"
2138><I
2139>outlen</I
2140></TT
2141> after return is the number of ocetes consumed.</TD
2142></TR
2143></TABLE
2144><P
2145></P
2146></DIV
2147></DIV
2148><HR><DIV
2149CLASS="REFSECT2"
2150><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00002151NAME="AEN20477"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002152></A
2153><H3
2154><A
2155NAME="ISOLAT1TOUTF8"
2156></A
2157>isolat1ToUTF8 ()</H3
2158><TABLE
2159BORDER="0"
2160BGCOLOR="#D6E8FF"
2161WIDTH="100%"
2162CELLPADDING="6"
2163><TR
2164><TD
2165><PRE
2166CLASS="PROGRAMLISTING"
2167>int isolat1ToUTF8 (unsigned char *out,
2168 int *outlen,
2169 unsigned char *in,
2170 int *inlen);</PRE
2171></TD
2172></TR
2173></TABLE
2174><P
2175>Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8
2176block of chars out.</P
2177><P
2178></P
2179><DIV
2180CLASS="INFORMALTABLE"
2181><P
2182></P
2183><TABLE
2184BORDER="0"
2185WIDTH="100%"
2186BGCOLOR="#FFD0D0"
2187CELLSPACING="0"
2188CELLPADDING="4"
2189CLASS="CALSTABLE"
2190><TR
2191><TD
2192WIDTH="20%"
2193ALIGN="RIGHT"
2194VALIGN="TOP"
2195><TT
2196CLASS="PARAMETER"
2197><I
2198>out</I
2199></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002200>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002201><TD
2202WIDTH="80%"
2203ALIGN="LEFT"
2204VALIGN="TOP"
2205> a pointer to an array of bytes to store the result</TD
2206></TR
2207><TR
2208><TD
2209WIDTH="20%"
2210ALIGN="RIGHT"
2211VALIGN="TOP"
2212><TT
2213CLASS="PARAMETER"
2214><I
2215>outlen</I
2216></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002217>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002218><TD
2219WIDTH="80%"
2220ALIGN="LEFT"
2221VALIGN="TOP"
2222> the length of <TT
2223CLASS="PARAMETER"
2224><I
2225>out</I
2226></TT
2227></TD
2228></TR
2229><TR
2230><TD
2231WIDTH="20%"
2232ALIGN="RIGHT"
2233VALIGN="TOP"
2234><TT
2235CLASS="PARAMETER"
2236><I
2237>in</I
2238></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002239>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002240><TD
2241WIDTH="80%"
2242ALIGN="LEFT"
2243VALIGN="TOP"
2244> a pointer to an array of ISO Latin 1 chars</TD
2245></TR
2246><TR
2247><TD
2248WIDTH="20%"
2249ALIGN="RIGHT"
2250VALIGN="TOP"
2251><TT
2252CLASS="PARAMETER"
2253><I
2254>inlen</I
2255></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002256>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002257><TD
2258WIDTH="80%"
2259ALIGN="LEFT"
2260VALIGN="TOP"
2261> the length of <TT
2262CLASS="PARAMETER"
2263><I
2264>in</I
2265></TT
2266></TD
2267></TR
2268><TR
2269><TD
2270WIDTH="20%"
2271ALIGN="RIGHT"
2272VALIGN="TOP"
2273><I
2274CLASS="EMPHASIS"
2275>Returns</I
2276> :</TD
2277><TD
2278WIDTH="80%"
2279ALIGN="LEFT"
2280VALIGN="TOP"
2281>0 if success, or -1 otherwise
2282The value of <TT
2283CLASS="PARAMETER"
2284><I
2285>inlen</I
2286></TT
2287> after return is the number of octets consumed
2288as the return value is positive, else unpredictiable.
2289The value of <TT
2290CLASS="PARAMETER"
2291><I
2292>outlen</I
2293></TT
2294> after return is the number of ocetes consumed.</TD
2295></TR
2296></TABLE
2297><P
2298></P
2299></DIV
2300></DIV
2301><HR><DIV
2302CLASS="REFSECT2"
2303><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00002304NAME="AEN20512"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002305></A
2306><H3
2307><A
2308NAME="XMLCHECKUTF8"
2309></A
2310>xmlCheckUTF8 ()</H3
2311><TABLE
2312BORDER="0"
2313BGCOLOR="#D6E8FF"
2314WIDTH="100%"
2315CELLPADDING="6"
2316><TR
2317><TD
2318><PRE
2319CLASS="PROGRAMLISTING"
2320>int xmlCheckUTF8 (unsigned char *utf);</PRE
2321></TD
2322></TR
2323></TABLE
2324><P
2325>Checks <TT
2326CLASS="PARAMETER"
2327><I
2328>utf</I
2329></TT
2330> for being valid utf-8. <TT
2331CLASS="PARAMETER"
2332><I
2333>utf</I
2334></TT
2335> is assumed to be
2336null-terminated. This function is not super-strict, as it will
2337allow longer utf-8 sequences than necessary. Note that Java is
2338capable of producing these sequences if provoked. Also note, this
2339routine checks for the 4-byte maxiumum size, but does not check for
23400x10ffff maximum value.</P
2341><P
2342></P
2343><DIV
2344CLASS="INFORMALTABLE"
2345><P
2346></P
2347><TABLE
2348BORDER="0"
2349WIDTH="100%"
2350BGCOLOR="#FFD0D0"
2351CELLSPACING="0"
2352CELLPADDING="4"
2353CLASS="CALSTABLE"
2354><TR
2355><TD
2356WIDTH="20%"
2357ALIGN="RIGHT"
2358VALIGN="TOP"
2359><TT
2360CLASS="PARAMETER"
2361><I
2362>utf</I
2363></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002364>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002365><TD
2366WIDTH="80%"
2367ALIGN="LEFT"
2368VALIGN="TOP"
2369> Pointer to putative utf-8 encoded string.</TD
2370></TR
2371><TR
2372><TD
2373WIDTH="20%"
2374ALIGN="RIGHT"
2375VALIGN="TOP"
2376><I
2377CLASS="EMPHASIS"
2378>Returns</I
2379> :</TD
2380><TD
2381WIDTH="80%"
2382ALIGN="LEFT"
2383VALIGN="TOP"
2384> true if <TT
2385CLASS="PARAMETER"
2386><I
2387>utf</I
2388></TT
2389> is valid.</TD
2390></TR
2391></TABLE
2392><P
2393></P
2394></DIV
2395></DIV
2396><HR><DIV
2397CLASS="REFSECT2"
2398><A
Daniel Veillard7d6fd212001-05-10 15:34:11 +00002399NAME="AEN20534"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002400></A
2401><H3
2402><A
2403NAME="XMLUTF8STRLEN"
2404></A
2405>xmlUTF8Strlen ()</H3
2406><TABLE
2407BORDER="0"
2408BGCOLOR="#D6E8FF"
2409WIDTH="100%"
2410CELLPADDING="6"
2411><TR
2412><TD
2413><PRE
2414CLASS="PROGRAMLISTING"
2415>int xmlUTF8Strlen (unsigned char *utf);</PRE
2416></TD
2417></TR
2418></TABLE
2419><P
2420>compute the lenght of an UTF8 string, it doesn't do a full UTF8
2421checking of the content of the string.</P
2422><P
2423></P
2424><DIV
2425CLASS="INFORMALTABLE"
2426><P
2427></P
2428><TABLE
2429BORDER="0"
2430WIDTH="100%"
2431BGCOLOR="#FFD0D0"
2432CELLSPACING="0"
2433CELLPADDING="4"
2434CLASS="CALSTABLE"
2435><TR
2436><TD
2437WIDTH="20%"
2438ALIGN="RIGHT"
2439VALIGN="TOP"
2440><TT
2441CLASS="PARAMETER"
2442><I
2443>utf</I
2444></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002445>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002446><TD
2447WIDTH="80%"
2448ALIGN="LEFT"
2449VALIGN="TOP"
2450> a sequence of UTF-8 encoded bytes</TD
2451></TR
2452><TR
2453><TD
2454WIDTH="20%"
2455ALIGN="RIGHT"
2456VALIGN="TOP"
2457><I
2458CLASS="EMPHASIS"
2459>Returns</I
2460> :</TD
2461><TD
2462WIDTH="80%"
2463ALIGN="LEFT"
2464VALIGN="TOP"
2465>the number of characters in the string or -1 in case of error</TD
2466></TR
2467></TABLE
2468><P
2469></P
2470></DIV
2471></DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +00002472></DIV
2473><DIV
2474CLASS="NAVFOOTER"
2475><BR
2476CLEAR="all"><BR><TABLE
2477WIDTH="100%"
2478BORDER="0"
2479BGCOLOR="#000000"
2480CELLPADDING="1"
2481CELLSPACING="0"
2482><TR
2483><TD
2484WIDTH="25%"
2485BGCOLOR="#C00000"
2486ALIGN="left"
2487><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002488HREF="libxml-parserinternals.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00002489><FONT
2490COLOR="#FFFFFF"
2491SIZE="3"
2492><B
2493>&#60;&#60;&#60; Previous Page</B
2494></FONT
2495></A
2496></TD
2497><TD
2498WIDTH="25%"
2499BGCOLOR="#0000C0"
2500ALIGN="center"
2501><FONT
2502COLOR="#FFFFFF"
2503SIZE="3"
2504><B
2505><A
2506HREF="book1.html"
2507><FONT
2508COLOR="#FFFFFF"
2509SIZE="3"
2510><B
2511>Home</B
2512></FONT
2513></A
2514></B
2515></FONT
2516></TD
2517><TD
2518WIDTH="25%"
2519BGCOLOR="#00C000"
2520ALIGN="center"
2521><FONT
2522COLOR="#FFFFFF"
2523SIZE="3"
2524><B
2525><A
2526HREF="libxml-lib.html"
2527><FONT
2528COLOR="#FFFFFF"
2529SIZE="3"
2530><B
2531>Up</B
2532></FONT
2533></A
2534></B
2535></FONT
2536></TD
2537><TD
2538WIDTH="25%"
2539BGCOLOR="#C00000"
2540ALIGN="right"
2541><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002542HREF="libxml-debugxml.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00002543><FONT
2544COLOR="#FFFFFF"
2545SIZE="3"
2546><B
2547>Next Page &#62;&#62;&#62;</B
2548></FONT
2549></A
2550></TD
2551></TR
2552><TR
2553><TD
2554COLSPAN="2"
2555ALIGN="left"
2556><FONT
2557COLOR="#FFFFFF"
2558SIZE="3"
2559><B
2560>parserInternals</B
2561></FONT
2562></TD
2563><TD
2564COLSPAN="2"
2565ALIGN="right"
2566><FONT
2567COLOR="#FFFFFF"
2568SIZE="3"
2569><B
2570>debugXML</B
2571></FONT
2572></TD
2573></TR
2574></TABLE
2575></DIV
2576></BODY
2577></HTML
2578>