blob: 017bf83037ddfd61f985b3c5e8d6ac0d687d2c84 [file] [log] [blame]
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001<HTML
2><HEAD
3><TITLE
4>encoding</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillard539638b2002-07-06 19:55:14 +00007CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
Daniel Veillard60087f32001-10-10 09:45:09 +00008"><LINK
Daniel Veillardaeea04f2000-01-25 19:27:27 +00009REL="HOME"
10TITLE="Gnome XML Library Reference Manual"
11HREF="book1.html"><LINK
12REL="UP"
13TITLE="Libxml Library Reference"
14HREF="libxml-lib.html"><LINK
15REL="PREVIOUS"
16TITLE="parserInternals"
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000017HREF="libxml-parserinternals.html"><LINK
Daniel Veillardaeea04f2000-01-25 19:27:27 +000018REL="NEXT"
Daniel Veillard52dcab32001-10-30 12:51:17 +000019TITLE="hash"
20HREF="libxml-hash.html"></HEAD
Daniel Veillardaeea04f2000-01-25 19:27:27 +000021><BODY
Daniel Veillardbed7b052001-05-19 14:59:49 +000022CLASS="REFENTRY"
Daniel Veillardaeea04f2000-01-25 19:27:27 +000023BGCOLOR="#FFFFFF"
24TEXT="#000000"
Daniel Veillard503b8932001-01-05 06:36:31 +000025LINK="#0000FF"
26VLINK="#840084"
27ALINK="#0000FF"
Daniel Veillardaeea04f2000-01-25 19:27:27 +000028><DIV
29CLASS="NAVHEADER"
30><TABLE
31WIDTH="100%"
32BORDER="0"
33BGCOLOR="#000000"
34CELLPADDING="1"
35CELLSPACING="0"
36><TR
37><TH
38COLSPAN="4"
39ALIGN="center"
40><FONT
41COLOR="#FFFFFF"
42SIZE="5"
43>Gnome XML Library Reference Manual</FONT
44></TH
45></TR
46><TR
47><TD
48WIDTH="25%"
49BGCOLOR="#C00000"
50ALIGN="left"
51><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000052HREF="libxml-parserinternals.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +000053><FONT
54COLOR="#FFFFFF"
55SIZE="3"
56><B
57>&#60;&#60;&#60; Previous Page</B
58></FONT
59></A
60></TD
61><TD
62WIDTH="25%"
63BGCOLOR="#0000C0"
64ALIGN="center"
65><FONT
66COLOR="#FFFFFF"
67SIZE="3"
68><B
69><A
70HREF="book1.html"
71><FONT
72COLOR="#FFFFFF"
73SIZE="3"
74><B
75>Home</B
76></FONT
77></A
78></B
79></FONT
80></TD
81><TD
82WIDTH="25%"
83BGCOLOR="#00C000"
84ALIGN="center"
85><FONT
86COLOR="#FFFFFF"
87SIZE="3"
88><B
89><A
90HREF="libxml-lib.html"
91><FONT
92COLOR="#FFFFFF"
93SIZE="3"
94><B
95>Up</B
96></FONT
97></A
98></B
99></FONT
100></TD
101><TD
102WIDTH="25%"
103BGCOLOR="#C00000"
104ALIGN="right"
105><A
Daniel Veillard52dcab32001-10-30 12:51:17 +0000106HREF="libxml-hash.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000107><FONT
108COLOR="#FFFFFF"
109SIZE="3"
110><B
111>Next Page &#62;&#62;&#62;</B
112></FONT
113></A
114></TD
115></TR
116></TABLE
117></DIV
118><H1
Daniel Veillard503b8932001-01-05 06:36:31 +0000119><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000120NAME="LIBXML-ENCODING">encoding</H1
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000121><DIV
122CLASS="REFNAMEDIV"
123><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000124NAME="AEN24436"
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 Veillard539638b2002-07-06 19:55:14 +0000132NAME="AEN24439"><H2
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000133>Synopsis</H2
134><TABLE
135BORDER="0"
136BGCOLOR="#D6E8FF"
137WIDTH="100%"
138CELLPADDING="6"
139><TR
140><TD
141><PRE
142CLASS="SYNOPSIS"
143>&#13;
144
145enum <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000146HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000147>xmlCharEncoding</A
148>;
149int (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000150HREF="libxml-encoding.html#XMLCHARENCODINGINPUTFUNC"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000151>*xmlCharEncodingInputFunc</A
152>) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000153 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000154 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000155 int *inlen);
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000156int (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000157HREF="libxml-encoding.html#XMLCHARENCODINGOUTPUTFUNC"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000158>*xmlCharEncodingOutputFunc</A
159>) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000160 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000161 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000162 int *inlen);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000163struct <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000164HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000165>xmlCharEncodingHandler</A
166>;
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000167typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000168HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000169>xmlCharEncodingHandlerPtr</A
170>;
171void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000172HREF="libxml-encoding.html#XMLINITCHARENCODINGHANDLERS"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000173>xmlInitCharEncodingHandlers</A
174> (void);
175void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000176HREF="libxml-encoding.html#XMLCLEANUPCHARENCODINGHANDLERS"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000177>xmlCleanupCharEncodingHandlers</A
178> (void);
179void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000180HREF="libxml-encoding.html#XMLREGISTERCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000181>xmlRegisterCharEncodingHandler</A
182> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000183HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000184>xmlCharEncodingHandlerPtr</A
185> handler);
186<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000187HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000188>xmlCharEncodingHandlerPtr</A
189> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000190HREF="libxml-encoding.html#XMLGETCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000191>xmlGetCharEncodingHandler</A
192>
193 (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000194HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000195>xmlCharEncoding</A
196> enc);
197<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000198HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000199>xmlCharEncodingHandlerPtr</A
200> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000201HREF="libxml-encoding.html#XMLFINDCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000202>xmlFindCharEncodingHandler</A
203>
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000204 (const char *name);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000205int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000206HREF="libxml-encoding.html#XMLADDENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000207>xmlAddEncodingAlias</A
208> (const char *name,
209 const char *alias);
210int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000211HREF="libxml-encoding.html#XMLDELENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000212>xmlDelEncodingAlias</A
213> (const char *alias);
214const char* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000215HREF="libxml-encoding.html#XMLGETENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000216>xmlGetEncodingAlias</A
217> (const char *alias);
218void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000219HREF="libxml-encoding.html#XMLCLEANUPENCODINGALIASES"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000220>xmlCleanupEncodingAliases</A
221> (void);
222<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000223HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000224>xmlCharEncoding</A
225> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000226HREF="libxml-encoding.html#XMLPARSECHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000227>xmlParseCharEncoding</A
228> (const char *name);
229const char* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000230HREF="libxml-encoding.html#XMLGETCHARENCODINGNAME"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000231>xmlGetCharEncodingName</A
232> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000233HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000234>xmlCharEncoding</A
235> enc);
236<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000237HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000238>xmlCharEncoding</A
239> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000240HREF="libxml-encoding.html#XMLDETECTCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000241>xmlDetectCharEncoding</A
242> (unsigned char *in,
243 int len);
244int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000245HREF="libxml-encoding.html#XMLCHARENCOUTFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000246>xmlCharEncOutFunc</A
247> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000248HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000249>xmlCharEncodingHandler</A
250> *handler,
251 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000252HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000253>xmlBufferPtr</A
254> out,
255 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000256HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000257>xmlBufferPtr</A
258> in);
259int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000260HREF="libxml-encoding.html#XMLCHARENCINFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000261>xmlCharEncInFunc</A
262> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000263HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000264>xmlCharEncodingHandler</A
265> *handler,
266 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000267HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000268>xmlBufferPtr</A
269> out,
270 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000271HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000272>xmlBufferPtr</A
273> in);
274int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000275HREF="libxml-encoding.html#XMLCHARENCFIRSTLINE"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000276>xmlCharEncFirstLine</A
277> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000278HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000279>xmlCharEncodingHandler</A
280> *handler,
281 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000282HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000283>xmlBufferPtr</A
284> out,
285 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000286HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000287>xmlBufferPtr</A
288> in);
289int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000290HREF="libxml-encoding.html#XMLCHARENCCLOSEFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000291>xmlCharEncCloseFunc</A
292> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000293HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000294>xmlCharEncodingHandler</A
Daniel Veillarda41123c2001-04-22 19:31:20 +0000295> *handler);
296int <A
297HREF="libxml-encoding.html#UTF8TOISOLAT1"
298>UTF8Toisolat1</A
299> (unsigned char *out,
300 int *outlen,
301 unsigned char *in,
302 int *inlen);
303int <A
304HREF="libxml-encoding.html#ISOLAT1TOUTF8"
305>isolat1ToUTF8</A
306> (unsigned char *out,
307 int *outlen,
308 unsigned char *in,
309 int *inlen);
310int <A
311HREF="libxml-encoding.html#XMLCHECKUTF8"
312>xmlCheckUTF8</A
313> (unsigned char *utf);
314int <A
Daniel Veillard4ec885a2001-06-17 10:31:07 +0000315HREF="libxml-encoding.html#XMLUTF8STRSIZE"
316>xmlUTF8Strsize</A
317> (const <A
318HREF="libxml-tree.html#XMLCHAR"
319>xmlChar</A
320> *utf,
321 int len);
322<A
323HREF="libxml-tree.html#XMLCHAR"
324>xmlChar</A
325>* <A
326HREF="libxml-encoding.html#XMLUTF8STRNDUP"
327>xmlUTF8Strndup</A
328> (const <A
329HREF="libxml-tree.html#XMLCHAR"
330>xmlChar</A
331> *utf,
332 int len);
333<A
334HREF="libxml-tree.html#XMLCHAR"
335>xmlChar</A
336>* <A
337HREF="libxml-encoding.html#XMLUTF8STRPOS"
338>xmlUTF8Strpos</A
339> (const <A
340HREF="libxml-tree.html#XMLCHAR"
341>xmlChar</A
342> *utf,
343 int pos);
344int <A
345HREF="libxml-encoding.html#XMLUTF8STRLOC"
346>xmlUTF8Strloc</A
347> (const <A
348HREF="libxml-tree.html#XMLCHAR"
349>xmlChar</A
350> *utf,
351 const <A
352HREF="libxml-tree.html#XMLCHAR"
353>xmlChar</A
354> *utfchar);
355<A
356HREF="libxml-tree.html#XMLCHAR"
357>xmlChar</A
358>* <A
359HREF="libxml-encoding.html#XMLUTF8STRSUB"
360>xmlUTF8Strsub</A
361> (const <A
362HREF="libxml-tree.html#XMLCHAR"
363>xmlChar</A
364> *utf,
365 int start,
366 int len);
367int <A
Daniel Veillarda41123c2001-04-22 19:31:20 +0000368HREF="libxml-encoding.html#XMLUTF8STRLEN"
369>xmlUTF8Strlen</A
Daniel Veillard4ec885a2001-06-17 10:31:07 +0000370> (const <A
371HREF="libxml-tree.html#XMLCHAR"
372>xmlChar</A
373> *utf);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000374></TD
375></TR
376></TABLE
377></DIV
378><DIV
379CLASS="REFSECT1"
380><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000381NAME="AEN24499"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000382></A
383><H2
384>Description</H2
385><P
386></P
387></DIV
388><DIV
389CLASS="REFSECT1"
390><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000391NAME="AEN24502"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000392></A
393><H2
394>Details</H2
395><DIV
396CLASS="REFSECT2"
397><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000398NAME="AEN24504"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000399></A
400><H3
401><A
402NAME="XMLCHARENCODING"
403></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000404>enum xmlCharEncoding</H3
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000405><TABLE
406BORDER="0"
407BGCOLOR="#D6E8FF"
408WIDTH="100%"
409CELLPADDING="6"
410><TR
411><TD
412><PRE
413CLASS="PROGRAMLISTING"
414>typedef enum {
415 XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
416 XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
417 XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
418 XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
419 XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
420 XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
421 XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
422 XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
423 XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
424 XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
425 XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
426 XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
427 XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
428 XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
429 XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
430 XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
431 XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
432 XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
433 XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
434 XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
435 XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
436 XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
Daniel Veillarde46e20d2000-07-14 15:02:46 +0000437 XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
438 XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000439} xmlCharEncoding;</PRE
440></TD
441></TR
442></TABLE
443><P
Daniel Veillard19274092002-03-25 16:48:03 +0000444>Predefined values for some standard encodings.
445Libxml don't do beforehand translation on UTF8, ISOLatinX.
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000446It also support UTF16 (LE and BE) by default.</P
447><P
448>Anything else would have to be translated to UTF8 before being
449given to the parser itself. The BOM for UTF16 and the encoding
450declaration are looked at and a converter is looked for at that
451point. If not found the parser stops here as asked by the XML REC
452Converter can be registered by the user using xmlRegisterCharEncodingHandler
Daniel Veillardcbaf3992001-12-31 16:16:02 +0000453but the current form doesn't allow stateful transcoding (a serious
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000454problem agreed !). If iconv has been found it will be used
455automatically and allow stateful transcoding, the simplest is then
456to be sure to enable icon and to provide iconv libs for the encoding
457support needed.</P
458><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000459></P
460></DIV
461><HR><DIV
462CLASS="REFSECT2"
463><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000464NAME="AEN24511"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000465></A
466><H3
467><A
468NAME="XMLCHARENCODINGINPUTFUNC"
469></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000470>xmlCharEncodingInputFunc ()</H3
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000471><TABLE
472BORDER="0"
473BGCOLOR="#D6E8FF"
474WIDTH="100%"
475CELLPADDING="6"
476><TR
477><TD
478><PRE
479CLASS="PROGRAMLISTING"
480>int (*xmlCharEncodingInputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000481 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000482 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000483 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000484></TD
485></TR
486></TABLE
487><P
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000488>Take a block of chars in the original encoding and try to convert
489it to an UTF-8 block of chars out.</P
490><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000491></P
492><DIV
493CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000494><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000495NAME="AEN24517"><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000496></P
497><TABLE
498BORDER="0"
499WIDTH="100%"
500BGCOLOR="#FFD0D0"
501CELLSPACING="0"
502CELLPADDING="4"
503CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000504><TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000505><TR
506><TD
507WIDTH="20%"
508ALIGN="RIGHT"
509VALIGN="TOP"
510><TT
511CLASS="PARAMETER"
512><I
513>out</I
514></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000515>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000516><TD
517WIDTH="80%"
518ALIGN="LEFT"
519VALIGN="TOP"
Daniel Veillardcbaf3992001-12-31 16:16:02 +0000520> a pointer to an array of bytes to store the UTF-8 result</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000521></TR
522><TR
523><TD
524WIDTH="20%"
525ALIGN="RIGHT"
526VALIGN="TOP"
527><TT
528CLASS="PARAMETER"
529><I
530>outlen</I
531></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000532>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000533><TD
534WIDTH="80%"
535ALIGN="LEFT"
536VALIGN="TOP"
Daniel Veillard60087f32001-10-10 09:45:09 +0000537> the length of <TT
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000538CLASS="PARAMETER"
539><I
540>out</I
541></TT
542></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000543></TR
544><TR
545><TD
546WIDTH="20%"
547ALIGN="RIGHT"
548VALIGN="TOP"
549><TT
550CLASS="PARAMETER"
551><I
552>in</I
553></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000554>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000555><TD
556WIDTH="80%"
557ALIGN="LEFT"
558VALIGN="TOP"
Daniel Veillardcbaf3992001-12-31 16:16:02 +0000559> a pointer to an array of chars in the original encoding</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000560></TR
561><TR
562><TD
563WIDTH="20%"
564ALIGN="RIGHT"
565VALIGN="TOP"
566><TT
567CLASS="PARAMETER"
568><I
569>inlen</I
570></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000571>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000572><TD
573WIDTH="80%"
574ALIGN="LEFT"
575VALIGN="TOP"
Daniel Veillard60087f32001-10-10 09:45:09 +0000576> the length of <TT
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000577CLASS="PARAMETER"
578><I
579>in</I
580></TT
581></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000582></TR
583><TR
584><TD
585WIDTH="20%"
586ALIGN="RIGHT"
587VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +0000588><SPAN
589CLASS="emphasis"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000590><I
591CLASS="EMPHASIS"
592>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +0000593></SPAN
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000594> :</TD
595><TD
596WIDTH="80%"
597ALIGN="LEFT"
598VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000599>the number of byte written, or -1 by lack of space, or -2
Daniel Veillardaf43f632002-03-08 15:05:20 +0000600if the transcoding failed.
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000601The value of <TT
602CLASS="PARAMETER"
603><I
604>inlen</I
605></TT
606> after return is the number of octets consumed
Daniel Veillardaf43f632002-03-08 15:05:20 +0000607as the return value is positive, else unpredictiable.
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000608The value of <TT
609CLASS="PARAMETER"
610><I
611>outlen</I
612></TT
Daniel Veillardcbaf3992001-12-31 16:16:02 +0000613> after return is the number of octets consumed.</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000614></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000615></TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000616></TABLE
617><P
618></P
619></DIV
620></DIV
621><HR><DIV
622CLASS="REFSECT2"
623><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000624NAME="AEN24546"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000625></A
626><H3
627><A
628NAME="XMLCHARENCODINGOUTPUTFUNC"
629></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000630>xmlCharEncodingOutputFunc ()</H3
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000631><TABLE
632BORDER="0"
633BGCOLOR="#D6E8FF"
634WIDTH="100%"
635CELLPADDING="6"
636><TR
637><TD
638><PRE
639CLASS="PROGRAMLISTING"
640>int (*xmlCharEncodingOutputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000641 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000642 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000643 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000644></TD
645></TR
646></TABLE
647><P
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000648>Take a block of UTF-8 chars in and try to convert it to an other
649encoding.
650Note: a first call designed to produce heading info is called with
Daniel Veillard19274092002-03-25 16:48:03 +0000651in = NULL. If stateful this should also initialize the encoder state.</P
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000652><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000653></P
654><DIV
655CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000656><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000657NAME="AEN24552"><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000658></P
659><TABLE
660BORDER="0"
661WIDTH="100%"
662BGCOLOR="#FFD0D0"
663CELLSPACING="0"
664CELLPADDING="4"
665CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000666><TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000667><TR
668><TD
669WIDTH="20%"
670ALIGN="RIGHT"
671VALIGN="TOP"
672><TT
673CLASS="PARAMETER"
674><I
675>out</I
676></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000677>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000678><TD
679WIDTH="80%"
680ALIGN="LEFT"
681VALIGN="TOP"
Daniel Veillardcbaf3992001-12-31 16:16:02 +0000682> a pointer to an array of bytes to store the result</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000683></TR
684><TR
685><TD
686WIDTH="20%"
687ALIGN="RIGHT"
688VALIGN="TOP"
689><TT
690CLASS="PARAMETER"
691><I
692>outlen</I
693></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000694>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000695><TD
696WIDTH="80%"
697ALIGN="LEFT"
698VALIGN="TOP"
Daniel Veillard60087f32001-10-10 09:45:09 +0000699> the length of <TT
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000700CLASS="PARAMETER"
701><I
702>out</I
703></TT
704></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000705></TR
706><TR
707><TD
708WIDTH="20%"
709ALIGN="RIGHT"
710VALIGN="TOP"
711><TT
712CLASS="PARAMETER"
713><I
714>in</I
715></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000716>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000717><TD
718WIDTH="80%"
719ALIGN="LEFT"
720VALIGN="TOP"
Daniel Veillardcbaf3992001-12-31 16:16:02 +0000721> a pointer to an array of UTF-8 chars</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000722></TR
723><TR
724><TD
725WIDTH="20%"
726ALIGN="RIGHT"
727VALIGN="TOP"
728><TT
729CLASS="PARAMETER"
730><I
731>inlen</I
732></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000733>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000734><TD
735WIDTH="80%"
736ALIGN="LEFT"
737VALIGN="TOP"
Daniel Veillard60087f32001-10-10 09:45:09 +0000738> the length of <TT
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000739CLASS="PARAMETER"
740><I
741>in</I
742></TT
743></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000744></TR
745><TR
746><TD
747WIDTH="20%"
748ALIGN="RIGHT"
749VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +0000750><SPAN
751CLASS="emphasis"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000752><I
753CLASS="EMPHASIS"
754>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +0000755></SPAN
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000756> :</TD
757><TD
758WIDTH="80%"
759ALIGN="LEFT"
760VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000761>the number of byte written, or -1 by lack of space, or -2
Daniel Veillardaf43f632002-03-08 15:05:20 +0000762if the transcoding failed.
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000763The value of <TT
764CLASS="PARAMETER"
765><I
766>inlen</I
767></TT
768> after return is the number of octets consumed
Daniel Veillardaf43f632002-03-08 15:05:20 +0000769as the return value is positive, else unpredictiable.
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000770The value of <TT
771CLASS="PARAMETER"
772><I
773>outlen</I
774></TT
775> after return is the number of ocetes consumed.</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000776></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000777></TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000778></TABLE
779><P
780></P
781></DIV
782></DIV
783><HR><DIV
784CLASS="REFSECT2"
785><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000786NAME="AEN24581"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000787></A
788><H3
789><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000790NAME="XMLCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000791></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000792>struct xmlCharEncodingHandler</H3
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000793><TABLE
794BORDER="0"
795BGCOLOR="#D6E8FF"
796WIDTH="100%"
797CELLPADDING="6"
798><TR
799><TD
800><PRE
801CLASS="PROGRAMLISTING"
802>struct xmlCharEncodingHandler {
803 char *name;
804 xmlCharEncodingInputFunc input;
805 xmlCharEncodingOutputFunc output;
806#ifdef LIBXML_ICONV_ENABLED
807 iconv_t iconv_in;
808 iconv_t iconv_out;
809#endif /* LIBXML_ICONV_ENABLED */
810};</PRE
811></TD
812></TR
813></TABLE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000814><P
815></P
816></DIV
817><HR><DIV
818CLASS="REFSECT2"
819><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000820NAME="AEN24586"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000821></A
822><H3
823><A
824NAME="XMLCHARENCODINGHANDLERPTR"
825></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000826>xmlCharEncodingHandlerPtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000827><TABLE
828BORDER="0"
829BGCOLOR="#D6E8FF"
830WIDTH="100%"
831CELLPADDING="6"
832><TR
833><TD
834><PRE
835CLASS="PROGRAMLISTING"
836>typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;</PRE
837></TD
838></TR
839></TABLE
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000840><P
841></P
842></DIV
843><HR><DIV
844CLASS="REFSECT2"
845><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000846NAME="AEN24591"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000847></A
848><H3
849><A
850NAME="XMLINITCHARENCODINGHANDLERS"
851></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000852>xmlInitCharEncodingHandlers ()</H3
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000853><TABLE
854BORDER="0"
855BGCOLOR="#D6E8FF"
856WIDTH="100%"
857CELLPADDING="6"
858><TR
859><TD
860><PRE
861CLASS="PROGRAMLISTING"
862>void xmlInitCharEncodingHandlers (void);</PRE
863></TD
864></TR
865></TABLE
866><P
867>Initialize the char encoding support, it registers the default
868encoding supported.
869NOTE: while public, this function usually doesn't need to be called
Daniel Veillardaf43f632002-03-08 15:05:20 +0000870in normal processing.</P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000871><P
872></P
873></DIV
874><HR><DIV
875CLASS="REFSECT2"
876><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000877NAME="AEN24597"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000878></A
879><H3
880><A
881NAME="XMLCLEANUPCHARENCODINGHANDLERS"
882></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000883>xmlCleanupCharEncodingHandlers ()</H3
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000884><TABLE
885BORDER="0"
886BGCOLOR="#D6E8FF"
887WIDTH="100%"
888CELLPADDING="6"
889><TR
890><TD
891><PRE
892CLASS="PROGRAMLISTING"
893>void xmlCleanupCharEncodingHandlers (void);</PRE
894></TD
895></TR
896></TABLE
897><P
898>Cleanup the memory allocated for the char encoding support, it
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000899unregisters all the encoding handlers and the aliases.</P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000900><P
901></P
902></DIV
903><HR><DIV
904CLASS="REFSECT2"
905><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000906NAME="AEN24603"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000907></A
908><H3
909><A
910NAME="XMLREGISTERCHARENCODINGHANDLER"
911></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000912>xmlRegisterCharEncodingHandler ()</H3
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000913><TABLE
914BORDER="0"
915BGCOLOR="#D6E8FF"
916WIDTH="100%"
917CELLPADDING="6"
918><TR
919><TD
920><PRE
921CLASS="PROGRAMLISTING"
922>void xmlRegisterCharEncodingHandler (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000923HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000924>xmlCharEncodingHandlerPtr</A
925> handler);</PRE
926></TD
927></TR
928></TABLE
929><P
Daniel Veillardcbaf3992001-12-31 16:16:02 +0000930>Register the char encoding handler, surprising, isn't it ?</P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000931><P
932></P
933><DIV
934CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000935><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000936NAME="AEN24610"><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000937></P
938><TABLE
939BORDER="0"
940WIDTH="100%"
941BGCOLOR="#FFD0D0"
942CELLSPACING="0"
943CELLPADDING="4"
944CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000945><TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000946><TR
947><TD
948WIDTH="20%"
949ALIGN="RIGHT"
950VALIGN="TOP"
951><TT
952CLASS="PARAMETER"
953><I
954>handler</I
955></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000956>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000957><TD
958WIDTH="80%"
959ALIGN="LEFT"
960VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000961> the xmlCharEncodingHandlerPtr handler block</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000962></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000963></TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000964></TABLE
965><P
966></P
967></DIV
968></DIV
969><HR><DIV
970CLASS="REFSECT2"
971><A
Daniel Veillard539638b2002-07-06 19:55:14 +0000972NAME="AEN24619"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000973></A
974><H3
975><A
976NAME="XMLGETCHARENCODINGHANDLER"
977></A
Daniel Veillardaf43f632002-03-08 15:05:20 +0000978>xmlGetCharEncodingHandler ()</H3
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000979><TABLE
980BORDER="0"
981BGCOLOR="#D6E8FF"
982WIDTH="100%"
983CELLPADDING="6"
984><TR
985><TD
986><PRE
987CLASS="PROGRAMLISTING"
988><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000989HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000990>xmlCharEncodingHandlerPtr</A
991> xmlGetCharEncodingHandler
992 (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000993HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000994>xmlCharEncoding</A
995> enc);</PRE
996></TD
997></TR
998></TABLE
999><P
Daniel Veillardcbaf3992001-12-31 16:16:02 +00001000>Search in the registered set the handler able to read/write that encoding.</P
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001001><P
1002></P
1003><DIV
1004CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001005><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001006NAME="AEN24627"><P
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001007></P
1008><TABLE
1009BORDER="0"
1010WIDTH="100%"
1011BGCOLOR="#FFD0D0"
1012CELLSPACING="0"
1013CELLPADDING="4"
1014CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001015><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001016><TR
1017><TD
1018WIDTH="20%"
1019ALIGN="RIGHT"
1020VALIGN="TOP"
1021><TT
1022CLASS="PARAMETER"
1023><I
1024>enc</I
1025></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001026>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001027><TD
1028WIDTH="80%"
1029ALIGN="LEFT"
1030VALIGN="TOP"
Daniel Veillardf012a642001-07-23 19:10:52 +00001031> an xmlCharEncoding value.</TD
1032></TR
1033><TR
1034><TD
1035WIDTH="20%"
1036ALIGN="RIGHT"
1037VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001038><SPAN
1039CLASS="emphasis"
Daniel Veillardf012a642001-07-23 19:10:52 +00001040><I
1041CLASS="EMPHASIS"
1042>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001043></SPAN
Daniel Veillardf012a642001-07-23 19:10:52 +00001044> :</TD
1045><TD
1046WIDTH="80%"
1047ALIGN="LEFT"
1048VALIGN="TOP"
1049>the handler or NULL if not found</TD
1050></TR
1051></TBODY
1052></TABLE
1053><P
1054></P
1055></DIV
1056></DIV
1057><HR><DIV
1058CLASS="REFSECT2"
1059><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001060NAME="AEN24640"
Daniel Veillardf012a642001-07-23 19:10:52 +00001061></A
1062><H3
1063><A
1064NAME="XMLFINDCHARENCODINGHANDLER"
1065></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001066>xmlFindCharEncodingHandler ()</H3
Daniel Veillardf012a642001-07-23 19:10:52 +00001067><TABLE
1068BORDER="0"
1069BGCOLOR="#D6E8FF"
1070WIDTH="100%"
1071CELLPADDING="6"
1072><TR
1073><TD
1074><PRE
1075CLASS="PROGRAMLISTING"
1076><A
1077HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
1078>xmlCharEncodingHandlerPtr</A
1079> xmlFindCharEncodingHandler
1080 (const char *name);</PRE
1081></TD
1082></TR
1083></TABLE
1084><P
Daniel Veillardcbaf3992001-12-31 16:16:02 +00001085>Search in the registered set the handler able to read/write that encoding.</P
Daniel Veillardf012a642001-07-23 19:10:52 +00001086><P
1087></P
1088><DIV
1089CLASS="INFORMALTABLE"
1090><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001091NAME="AEN24647"><P
Daniel Veillardf012a642001-07-23 19:10:52 +00001092></P
1093><TABLE
1094BORDER="0"
1095WIDTH="100%"
1096BGCOLOR="#FFD0D0"
1097CELLSPACING="0"
1098CELLPADDING="4"
1099CLASS="CALSTABLE"
1100><TBODY
1101><TR
1102><TD
1103WIDTH="20%"
1104ALIGN="RIGHT"
1105VALIGN="TOP"
1106><TT
1107CLASS="PARAMETER"
1108><I
1109>name</I
1110></TT
1111>&nbsp;:</TD
1112><TD
1113WIDTH="80%"
1114ALIGN="LEFT"
1115VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001116> a string describing the char encoding.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001117></TR
1118><TR
1119><TD
1120WIDTH="20%"
1121ALIGN="RIGHT"
1122VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001123><SPAN
1124CLASS="emphasis"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001125><I
1126CLASS="EMPHASIS"
1127>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001128></SPAN
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001129> :</TD
1130><TD
1131WIDTH="80%"
1132ALIGN="LEFT"
1133VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001134>the handler or NULL if not found</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001135></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001136></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001137></TABLE
1138><P
1139></P
1140></DIV
1141></DIV
1142><HR><DIV
1143CLASS="REFSECT2"
1144><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001145NAME="AEN24660"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001146></A
1147><H3
1148><A
1149NAME="XMLADDENCODINGALIAS"
1150></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001151>xmlAddEncodingAlias ()</H3
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001152><TABLE
1153BORDER="0"
1154BGCOLOR="#D6E8FF"
1155WIDTH="100%"
1156CELLPADDING="6"
1157><TR
1158><TD
1159><PRE
1160CLASS="PROGRAMLISTING"
1161>int xmlAddEncodingAlias (const char *name,
1162 const char *alias);</PRE
1163></TD
1164></TR
1165></TABLE
1166><P
1167>Registers and alias <TT
1168CLASS="PARAMETER"
1169><I
1170>alias</I
1171></TT
1172> for an encoding named <TT
1173CLASS="PARAMETER"
1174><I
1175>name</I
1176></TT
1177>. Existing alias
1178will be overwritten.</P
1179><P
1180></P
1181><DIV
1182CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001183><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001184NAME="AEN24668"><P
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001185></P
1186><TABLE
1187BORDER="0"
1188WIDTH="100%"
1189BGCOLOR="#FFD0D0"
1190CELLSPACING="0"
1191CELLPADDING="4"
1192CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001193><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001194><TR
1195><TD
1196WIDTH="20%"
1197ALIGN="RIGHT"
1198VALIGN="TOP"
1199><TT
1200CLASS="PARAMETER"
1201><I
1202>name</I
1203></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001204>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001205><TD
1206WIDTH="80%"
1207ALIGN="LEFT"
1208VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001209> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001210></TR
1211><TR
1212><TD
1213WIDTH="20%"
1214ALIGN="RIGHT"
1215VALIGN="TOP"
1216><TT
1217CLASS="PARAMETER"
1218><I
1219>alias</I
1220></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001221>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001222><TD
1223WIDTH="80%"
1224ALIGN="LEFT"
1225VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001226> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001227></TR
1228><TR
1229><TD
1230WIDTH="20%"
1231ALIGN="RIGHT"
1232VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001233><SPAN
1234CLASS="emphasis"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001235><I
1236CLASS="EMPHASIS"
1237>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001238></SPAN
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001239> :</TD
1240><TD
1241WIDTH="80%"
1242ALIGN="LEFT"
1243VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001244>0 in case of success, -1 in case of error</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001245></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001246></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001247></TABLE
1248><P
1249></P
1250></DIV
1251></DIV
1252><HR><DIV
1253CLASS="REFSECT2"
1254><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001255NAME="AEN24685"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001256></A
1257><H3
1258><A
1259NAME="XMLDELENCODINGALIAS"
1260></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001261>xmlDelEncodingAlias ()</H3
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001262><TABLE
1263BORDER="0"
1264BGCOLOR="#D6E8FF"
1265WIDTH="100%"
1266CELLPADDING="6"
1267><TR
1268><TD
1269><PRE
1270CLASS="PROGRAMLISTING"
1271>int xmlDelEncodingAlias (const char *alias);</PRE
1272></TD
1273></TR
1274></TABLE
1275><P
1276>Unregisters an encoding alias <TT
1277CLASS="PARAMETER"
1278><I
1279>alias</I
1280></TT
1281></P
1282><P
1283></P
1284><DIV
1285CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001286><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001287NAME="AEN24692"><P
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001288></P
1289><TABLE
1290BORDER="0"
1291WIDTH="100%"
1292BGCOLOR="#FFD0D0"
1293CELLSPACING="0"
1294CELLPADDING="4"
1295CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001296><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001297><TR
1298><TD
1299WIDTH="20%"
1300ALIGN="RIGHT"
1301VALIGN="TOP"
1302><TT
1303CLASS="PARAMETER"
1304><I
1305>alias</I
1306></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001307>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001308><TD
1309WIDTH="80%"
1310ALIGN="LEFT"
1311VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001312> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001313></TR
1314><TR
1315><TD
1316WIDTH="20%"
1317ALIGN="RIGHT"
1318VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001319><SPAN
1320CLASS="emphasis"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001321><I
1322CLASS="EMPHASIS"
1323>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001324></SPAN
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001325> :</TD
1326><TD
1327WIDTH="80%"
1328ALIGN="LEFT"
1329VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001330>0 in case of success, -1 in case of error</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001331></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001332></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001333></TABLE
1334><P
1335></P
1336></DIV
1337></DIV
1338><HR><DIV
1339CLASS="REFSECT2"
1340><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001341NAME="AEN24705"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001342></A
1343><H3
1344><A
1345NAME="XMLGETENCODINGALIAS"
1346></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001347>xmlGetEncodingAlias ()</H3
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001348><TABLE
1349BORDER="0"
1350BGCOLOR="#D6E8FF"
1351WIDTH="100%"
1352CELLPADDING="6"
1353><TR
1354><TD
1355><PRE
1356CLASS="PROGRAMLISTING"
1357>const char* xmlGetEncodingAlias (const char *alias);</PRE
1358></TD
1359></TR
1360></TABLE
1361><P
1362>Lookup an encoding name for the given alias.</P
1363><P
1364></P
1365><DIV
1366CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001367><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001368NAME="AEN24711"><P
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001369></P
1370><TABLE
1371BORDER="0"
1372WIDTH="100%"
1373BGCOLOR="#FFD0D0"
1374CELLSPACING="0"
1375CELLPADDING="4"
1376CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001377><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001378><TR
1379><TD
1380WIDTH="20%"
1381ALIGN="RIGHT"
1382VALIGN="TOP"
1383><TT
1384CLASS="PARAMETER"
1385><I
1386>alias</I
1387></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001388>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001389><TD
1390WIDTH="80%"
1391ALIGN="LEFT"
1392VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001393> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001394></TR
1395><TR
1396><TD
1397WIDTH="20%"
1398ALIGN="RIGHT"
1399VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001400><SPAN
1401CLASS="emphasis"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001402><I
1403CLASS="EMPHASIS"
1404>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001405></SPAN
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001406> :</TD
1407><TD
1408WIDTH="80%"
1409ALIGN="LEFT"
1410VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001411>NULL if not found the original name otherwise</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001412></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001413></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001414></TABLE
1415><P
1416></P
1417></DIV
1418></DIV
1419><HR><DIV
1420CLASS="REFSECT2"
1421><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001422NAME="AEN24724"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001423></A
1424><H3
1425><A
1426NAME="XMLCLEANUPENCODINGALIASES"
1427></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001428>xmlCleanupEncodingAliases ()</H3
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001429><TABLE
1430BORDER="0"
1431BGCOLOR="#D6E8FF"
1432WIDTH="100%"
1433CELLPADDING="6"
1434><TR
1435><TD
1436><PRE
1437CLASS="PROGRAMLISTING"
1438>void xmlCleanupEncodingAliases (void);</PRE
1439></TD
1440></TR
1441></TABLE
1442><P
1443>Unregisters all aliases</P
1444><P
1445></P
1446></DIV
1447><HR><DIV
1448CLASS="REFSECT2"
1449><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001450NAME="AEN24730"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001451></A
1452><H3
1453><A
1454NAME="XMLPARSECHARENCODING"
1455></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001456>xmlParseCharEncoding ()</H3
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001457><TABLE
1458BORDER="0"
1459BGCOLOR="#D6E8FF"
1460WIDTH="100%"
1461CELLPADDING="6"
1462><TR
1463><TD
1464><PRE
1465CLASS="PROGRAMLISTING"
1466><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001467HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001468>xmlCharEncoding</A
1469> xmlParseCharEncoding (const char *name);</PRE
1470></TD
1471></TR
1472></TABLE
1473><P
Daniel Veillardcbaf3992001-12-31 16:16:02 +00001474>Compare the string to the known encoding schemes already known. Note
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001475that the comparison is case insensitive accordingly to the section
1476[XML] 4.3.3 Character Encoding in Entities.</P
1477><P
1478></P
1479><DIV
1480CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001481><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001482NAME="AEN24737"><P
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001483></P
1484><TABLE
1485BORDER="0"
1486WIDTH="100%"
1487BGCOLOR="#FFD0D0"
1488CELLSPACING="0"
1489CELLPADDING="4"
1490CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001491><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001492><TR
1493><TD
1494WIDTH="20%"
1495ALIGN="RIGHT"
1496VALIGN="TOP"
1497><TT
1498CLASS="PARAMETER"
1499><I
1500>name</I
1501></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001502>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001503><TD
1504WIDTH="80%"
1505ALIGN="LEFT"
1506VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001507> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001508></TR
1509><TR
1510><TD
1511WIDTH="20%"
1512ALIGN="RIGHT"
1513VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001514><SPAN
1515CLASS="emphasis"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001516><I
1517CLASS="EMPHASIS"
1518>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001519></SPAN
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001520> :</TD
1521><TD
1522WIDTH="80%"
1523ALIGN="LEFT"
1524VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001525>one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE
1526if not recognized.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001527></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001528></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001529></TABLE
1530><P
1531></P
1532></DIV
1533></DIV
1534><HR><DIV
1535CLASS="REFSECT2"
1536><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001537NAME="AEN24750"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001538></A
1539><H3
1540><A
1541NAME="XMLGETCHARENCODINGNAME"
1542></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001543>xmlGetCharEncodingName ()</H3
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001544><TABLE
1545BORDER="0"
1546BGCOLOR="#D6E8FF"
1547WIDTH="100%"
1548CELLPADDING="6"
1549><TR
1550><TD
1551><PRE
1552CLASS="PROGRAMLISTING"
1553>const char* xmlGetCharEncodingName (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001554HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001555>xmlCharEncoding</A
1556> enc);</PRE
1557></TD
1558></TR
1559></TABLE
1560><P
1561>The "canonical" name for XML encoding.
1562C.f. http://www.w3.org/TR/REC-xml<GTKDOCLINK
1563HREF="CHARENCODING"
1564>charencoding</GTKDOCLINK
1565>
1566Section 4.3.3 Character Encoding in Entities</P
1567><P
1568></P
1569><DIV
1570CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001571><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001572NAME="AEN24758"><P
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001573></P
1574><TABLE
1575BORDER="0"
1576WIDTH="100%"
1577BGCOLOR="#FFD0D0"
1578CELLSPACING="0"
1579CELLPADDING="4"
1580CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001581><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001582><TR
1583><TD
1584WIDTH="20%"
1585ALIGN="RIGHT"
1586VALIGN="TOP"
1587><TT
1588CLASS="PARAMETER"
1589><I
1590>enc</I
1591></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001592>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001593><TD
1594WIDTH="80%"
1595ALIGN="LEFT"
1596VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001597> the encoding</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001598></TR
1599><TR
1600><TD
1601WIDTH="20%"
1602ALIGN="RIGHT"
1603VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001604><SPAN
1605CLASS="emphasis"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001606><I
1607CLASS="EMPHASIS"
1608>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001609></SPAN
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001610> :</TD
1611><TD
1612WIDTH="80%"
1613ALIGN="LEFT"
1614VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001615>the canonical name for the given encoding</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001616></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001617></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001618></TABLE
1619><P
1620></P
1621></DIV
1622></DIV
1623><HR><DIV
1624CLASS="REFSECT2"
1625><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001626NAME="AEN24771"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001627></A
1628><H3
1629><A
1630NAME="XMLDETECTCHARENCODING"
1631></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001632>xmlDetectCharEncoding ()</H3
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001633><TABLE
1634BORDER="0"
1635BGCOLOR="#D6E8FF"
1636WIDTH="100%"
1637CELLPADDING="6"
1638><TR
1639><TD
1640><PRE
1641CLASS="PROGRAMLISTING"
1642><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001643HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001644>xmlCharEncoding</A
1645> xmlDetectCharEncoding (unsigned char *in,
1646 int len);</PRE
1647></TD
1648></TR
1649></TABLE
1650><P
1651>Guess the encoding of the entity using the first bytes of the entity content
1652accordingly of the non-normative appendix F of the XML-1.0 recommendation.</P
1653><P
1654></P
1655><DIV
1656CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001657><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001658NAME="AEN24778"><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001659></P
1660><TABLE
1661BORDER="0"
1662WIDTH="100%"
1663BGCOLOR="#FFD0D0"
1664CELLSPACING="0"
1665CELLPADDING="4"
1666CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001667><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001668><TR
1669><TD
1670WIDTH="20%"
1671ALIGN="RIGHT"
1672VALIGN="TOP"
1673><TT
1674CLASS="PARAMETER"
1675><I
1676>in</I
1677></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001678>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001679><TD
1680WIDTH="80%"
1681ALIGN="LEFT"
1682VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001683> a pointer to the first bytes of the XML entity, must be at least
Daniel Veillardaf43f632002-03-08 15:05:20 +000016844 bytes long.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001685></TR
1686><TR
1687><TD
1688WIDTH="20%"
1689ALIGN="RIGHT"
1690VALIGN="TOP"
1691><TT
1692CLASS="PARAMETER"
1693><I
1694>len</I
1695></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001696>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001697><TD
1698WIDTH="80%"
1699ALIGN="LEFT"
1700VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001701> pointer to the length of the buffer</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001702></TR
1703><TR
1704><TD
1705WIDTH="20%"
1706ALIGN="RIGHT"
1707VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001708><SPAN
1709CLASS="emphasis"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001710><I
1711CLASS="EMPHASIS"
1712>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001713></SPAN
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001714> :</TD
1715><TD
1716WIDTH="80%"
1717ALIGN="LEFT"
1718VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001719>one of the XML_CHAR_ENCODING_... values.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001720></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001721></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001722></TABLE
1723><P
1724></P
1725></DIV
1726></DIV
1727><HR><DIV
1728CLASS="REFSECT2"
1729><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001730NAME="AEN24795"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001731></A
1732><H3
1733><A
1734NAME="XMLCHARENCOUTFUNC"
1735></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001736>xmlCharEncOutFunc ()</H3
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001737><TABLE
1738BORDER="0"
1739BGCOLOR="#D6E8FF"
1740WIDTH="100%"
1741CELLPADDING="6"
1742><TR
1743><TD
1744><PRE
1745CLASS="PROGRAMLISTING"
1746>int xmlCharEncOutFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001747HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001748>xmlCharEncodingHandler</A
1749> *handler,
1750 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001751HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001752>xmlBufferPtr</A
1753> out,
1754 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001755HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001756>xmlBufferPtr</A
1757> in);</PRE
1758></TD
1759></TR
1760></TABLE
1761><P
1762>Generic front-end for the encoding handler output function
1763a first call with <TT
1764CLASS="PARAMETER"
1765><I
1766>in</I
1767></TT
1768> == NULL has to be made firs to initiate the
1769output in case of non-stateless encoding needing to initiate their
1770state or the output (like the BOM in UTF16).
1771In case of UTF8 sequence conversion errors for the given encoder,
1772the content will be automatically remapped to a CharRef sequence.</P
1773><P
1774></P
1775><DIV
1776CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001777><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001778NAME="AEN24805"><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001779></P
1780><TABLE
1781BORDER="0"
1782WIDTH="100%"
1783BGCOLOR="#FFD0D0"
1784CELLSPACING="0"
1785CELLPADDING="4"
1786CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001787><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001788><TR
1789><TD
1790WIDTH="20%"
1791ALIGN="RIGHT"
1792VALIGN="TOP"
1793><TT
1794CLASS="PARAMETER"
1795><I
1796>handler</I
1797></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001798>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001799><TD
1800WIDTH="80%"
1801ALIGN="LEFT"
1802VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001803> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001804></TR
1805><TR
1806><TD
1807WIDTH="20%"
1808ALIGN="RIGHT"
1809VALIGN="TOP"
1810><TT
1811CLASS="PARAMETER"
1812><I
1813>out</I
1814></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001815>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001816><TD
1817WIDTH="80%"
1818ALIGN="LEFT"
1819VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001820> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001821></TR
1822><TR
1823><TD
1824WIDTH="20%"
1825ALIGN="RIGHT"
1826VALIGN="TOP"
1827><TT
1828CLASS="PARAMETER"
1829><I
Daniel Veillard06047432000-04-24 11:33:38 +00001830>in</I
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001831></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001832>&nbsp;:</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001833><TD
1834WIDTH="80%"
1835ALIGN="LEFT"
1836VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001837> an xmlBuffer for the input</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001838></TR
1839><TR
1840><TD
1841WIDTH="20%"
1842ALIGN="RIGHT"
1843VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001844><SPAN
1845CLASS="emphasis"
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001846><I
1847CLASS="EMPHASIS"
1848>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001849></SPAN
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001850> :</TD
1851><TD
1852WIDTH="80%"
1853ALIGN="LEFT"
1854VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001855>the number of byte written if success, or
Daniel Veillardaf43f632002-03-08 15:05:20 +00001856-1 general error
1857-2 if the transcoding fails (for *in is not valid utf8 string or
1858the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001859></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001860></TBODY
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001861></TABLE
1862><P
1863></P
1864></DIV
1865></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00001866><HR><DIV
1867CLASS="REFSECT2"
1868><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001869NAME="AEN24826"
Daniel Veillard06047432000-04-24 11:33:38 +00001870></A
1871><H3
1872><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001873NAME="XMLCHARENCINFUNC"
Daniel Veillard06047432000-04-24 11:33:38 +00001874></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00001875>xmlCharEncInFunc ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001876><TABLE
1877BORDER="0"
1878BGCOLOR="#D6E8FF"
1879WIDTH="100%"
1880CELLPADDING="6"
1881><TR
1882><TD
1883><PRE
1884CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001885>int xmlCharEncInFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001886HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001887>xmlCharEncodingHandler</A
1888> *handler,
1889 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001890HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001891>xmlBufferPtr</A
1892> out,
1893 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001894HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001895>xmlBufferPtr</A
1896> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001897></TD
1898></TR
1899></TABLE
1900><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001901>Generic front-end for the encoding handler input function</P
Daniel Veillard06047432000-04-24 11:33:38 +00001902><P
1903></P
1904><DIV
1905CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001906><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001907NAME="AEN24835"><P
Daniel Veillard06047432000-04-24 11:33:38 +00001908></P
1909><TABLE
1910BORDER="0"
1911WIDTH="100%"
1912BGCOLOR="#FFD0D0"
1913CELLSPACING="0"
1914CELLPADDING="4"
1915CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001916><TBODY
Daniel Veillard06047432000-04-24 11:33:38 +00001917><TR
1918><TD
1919WIDTH="20%"
1920ALIGN="RIGHT"
1921VALIGN="TOP"
1922><TT
1923CLASS="PARAMETER"
1924><I
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001925>handler</I
Daniel Veillard06047432000-04-24 11:33:38 +00001926></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001927>&nbsp;:</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001928><TD
1929WIDTH="80%"
1930ALIGN="LEFT"
1931VALIGN="TOP"
Daniel Veillardcbaf3992001-12-31 16:16:02 +00001932> char encoding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001933></TR
1934><TR
1935><TD
1936WIDTH="20%"
1937ALIGN="RIGHT"
1938VALIGN="TOP"
1939><TT
1940CLASS="PARAMETER"
1941><I
1942>out</I
1943></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001944>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001945><TD
1946WIDTH="80%"
1947ALIGN="LEFT"
1948VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001949> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001950></TR
1951><TR
1952><TD
1953WIDTH="20%"
1954ALIGN="RIGHT"
1955VALIGN="TOP"
1956><TT
1957CLASS="PARAMETER"
1958><I
1959>in</I
1960></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001961>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001962><TD
1963WIDTH="80%"
1964ALIGN="LEFT"
1965VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001966> an xmlBuffer for the input</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001967></TR
1968><TR
1969><TD
1970WIDTH="20%"
1971ALIGN="RIGHT"
1972VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00001973><SPAN
1974CLASS="emphasis"
Daniel Veillard06047432000-04-24 11:33:38 +00001975><I
1976CLASS="EMPHASIS"
1977>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00001978></SPAN
Daniel Veillard06047432000-04-24 11:33:38 +00001979> :</TD
1980><TD
1981WIDTH="80%"
1982ALIGN="LEFT"
1983VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001984>the number of byte written if success, or
Daniel Veillardaf43f632002-03-08 15:05:20 +00001985-1 general error
1986-2 if the transcoding fails (for *in is not valid utf8 string or
1987the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001988></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001989></TBODY
Daniel Veillard06047432000-04-24 11:33:38 +00001990></TABLE
1991><P
1992></P
1993></DIV
1994></DIV
1995><HR><DIV
1996CLASS="REFSECT2"
1997><A
Daniel Veillard539638b2002-07-06 19:55:14 +00001998NAME="AEN24856"
Daniel Veillard06047432000-04-24 11:33:38 +00001999></A
2000><H3
2001><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002002NAME="XMLCHARENCFIRSTLINE"
Daniel Veillard06047432000-04-24 11:33:38 +00002003></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002004>xmlCharEncFirstLine ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00002005><TABLE
2006BORDER="0"
2007BGCOLOR="#D6E8FF"
2008WIDTH="100%"
2009CELLPADDING="6"
2010><TR
2011><TD
2012><PRE
2013CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002014>int xmlCharEncFirstLine (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002015HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002016>xmlCharEncodingHandler</A
2017> *handler,
2018 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002019HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002020>xmlBufferPtr</A
2021> out,
2022 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002023HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002024>xmlBufferPtr</A
2025> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00002026></TD
2027></TR
2028></TABLE
2029><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002030>Front-end for the encoding handler input function, but handle only
2031the very first line, i.e. limit itself to 45 chars.</P
Daniel Veillard06047432000-04-24 11:33:38 +00002032><P
2033></P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002034><DIV
2035CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002036><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002037NAME="AEN24865"><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002038></P
2039><TABLE
2040BORDER="0"
2041WIDTH="100%"
2042BGCOLOR="#FFD0D0"
2043CELLSPACING="0"
2044CELLPADDING="4"
2045CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002046><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002047><TR
2048><TD
2049WIDTH="20%"
2050ALIGN="RIGHT"
2051VALIGN="TOP"
2052><TT
2053CLASS="PARAMETER"
2054><I
2055>handler</I
2056></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002057>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002058><TD
2059WIDTH="80%"
2060ALIGN="LEFT"
2061VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002062> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002063></TR
2064><TR
2065><TD
2066WIDTH="20%"
2067ALIGN="RIGHT"
2068VALIGN="TOP"
2069><TT
2070CLASS="PARAMETER"
2071><I
2072>out</I
2073></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002074>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002075><TD
2076WIDTH="80%"
2077ALIGN="LEFT"
2078VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002079> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002080></TR
2081><TR
2082><TD
2083WIDTH="20%"
2084ALIGN="RIGHT"
2085VALIGN="TOP"
2086><TT
2087CLASS="PARAMETER"
2088><I
2089>in</I
2090></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002091>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002092><TD
2093WIDTH="80%"
2094ALIGN="LEFT"
2095VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002096> an xmlBuffer for the input</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002097></TR
2098><TR
2099><TD
2100WIDTH="20%"
2101ALIGN="RIGHT"
2102VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002103><SPAN
2104CLASS="emphasis"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002105><I
2106CLASS="EMPHASIS"
2107>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002108></SPAN
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002109> :</TD
2110><TD
2111WIDTH="80%"
2112ALIGN="LEFT"
2113VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002114>the number of byte written if success, or
Daniel Veillardaf43f632002-03-08 15:05:20 +00002115-1 general error
2116-2 if the transcoding fails (for *in is not valid utf8 string or
2117the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002118></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002119></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002120></TABLE
2121><P
2122></P
2123></DIV
2124></DIV
2125><HR><DIV
2126CLASS="REFSECT2"
2127><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002128NAME="AEN24886"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002129></A
2130><H3
2131><A
2132NAME="XMLCHARENCCLOSEFUNC"
2133></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002134>xmlCharEncCloseFunc ()</H3
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002135><TABLE
2136BORDER="0"
2137BGCOLOR="#D6E8FF"
2138WIDTH="100%"
2139CELLPADDING="6"
2140><TR
2141><TD
2142><PRE
2143CLASS="PROGRAMLISTING"
2144>int xmlCharEncCloseFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002145HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002146>xmlCharEncodingHandler</A
2147> *handler);</PRE
2148></TD
2149></TR
2150></TABLE
2151><P
Daniel Veillardcbaf3992001-12-31 16:16:02 +00002152>Generic front-end for encoding handler close function</P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002153><P
2154></P
2155><DIV
2156CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002157><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002158NAME="AEN24893"><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002159></P
2160><TABLE
2161BORDER="0"
2162WIDTH="100%"
2163BGCOLOR="#FFD0D0"
2164CELLSPACING="0"
2165CELLPADDING="4"
2166CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002167><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002168><TR
2169><TD
2170WIDTH="20%"
2171ALIGN="RIGHT"
2172VALIGN="TOP"
2173><TT
2174CLASS="PARAMETER"
2175><I
2176>handler</I
2177></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002178>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002179><TD
2180WIDTH="80%"
2181ALIGN="LEFT"
2182VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002183> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002184></TR
2185><TR
2186><TD
2187WIDTH="20%"
2188ALIGN="RIGHT"
2189VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002190><SPAN
2191CLASS="emphasis"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002192><I
2193CLASS="EMPHASIS"
2194>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002195></SPAN
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002196> :</TD
2197><TD
2198WIDTH="80%"
2199ALIGN="LEFT"
2200VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002201>0 if success, or -1 in case of error</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002202></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002203></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002204></TABLE
2205><P
2206></P
2207></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00002208></DIV
Daniel Veillarda41123c2001-04-22 19:31:20 +00002209><HR><DIV
2210CLASS="REFSECT2"
2211><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002212NAME="AEN24906"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002213></A
2214><H3
2215><A
2216NAME="UTF8TOISOLAT1"
2217></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002218>UTF8Toisolat1 ()</H3
Daniel Veillarda41123c2001-04-22 19:31:20 +00002219><TABLE
2220BORDER="0"
2221BGCOLOR="#D6E8FF"
2222WIDTH="100%"
2223CELLPADDING="6"
2224><TR
2225><TD
2226><PRE
2227CLASS="PROGRAMLISTING"
2228>int UTF8Toisolat1 (unsigned char *out,
2229 int *outlen,
2230 unsigned char *in,
2231 int *inlen);</PRE
2232></TD
2233></TR
2234></TABLE
2235><P
2236>Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1
2237block of chars out.</P
2238><P
2239></P
2240><DIV
2241CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002242><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002243NAME="AEN24912"><P
Daniel Veillarda41123c2001-04-22 19:31:20 +00002244></P
2245><TABLE
2246BORDER="0"
2247WIDTH="100%"
2248BGCOLOR="#FFD0D0"
2249CELLSPACING="0"
2250CELLPADDING="4"
2251CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002252><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002253><TR
2254><TD
2255WIDTH="20%"
2256ALIGN="RIGHT"
2257VALIGN="TOP"
2258><TT
2259CLASS="PARAMETER"
2260><I
2261>out</I
2262></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002263>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002264><TD
2265WIDTH="80%"
2266ALIGN="LEFT"
2267VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002268> a pointer to an array of bytes to store the result</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002269></TR
2270><TR
2271><TD
2272WIDTH="20%"
2273ALIGN="RIGHT"
2274VALIGN="TOP"
2275><TT
2276CLASS="PARAMETER"
2277><I
2278>outlen</I
2279></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002280>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002281><TD
2282WIDTH="80%"
2283ALIGN="LEFT"
2284VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002285> the length of <TT
2286CLASS="PARAMETER"
2287><I
2288>out</I
2289></TT
2290></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002291></TR
2292><TR
2293><TD
2294WIDTH="20%"
2295ALIGN="RIGHT"
2296VALIGN="TOP"
2297><TT
2298CLASS="PARAMETER"
2299><I
2300>in</I
2301></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002302>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002303><TD
2304WIDTH="80%"
2305ALIGN="LEFT"
2306VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002307> a pointer to an array of UTF-8 chars</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002308></TR
2309><TR
2310><TD
2311WIDTH="20%"
2312ALIGN="RIGHT"
2313VALIGN="TOP"
2314><TT
2315CLASS="PARAMETER"
2316><I
2317>inlen</I
2318></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002319>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002320><TD
2321WIDTH="80%"
2322ALIGN="LEFT"
2323VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002324> the length of <TT
2325CLASS="PARAMETER"
2326><I
2327>in</I
2328></TT
2329></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002330></TR
2331><TR
2332><TD
2333WIDTH="20%"
2334ALIGN="RIGHT"
2335VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002336><SPAN
2337CLASS="emphasis"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002338><I
2339CLASS="EMPHASIS"
2340>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002341></SPAN
Daniel Veillarda41123c2001-04-22 19:31:20 +00002342> :</TD
2343><TD
2344WIDTH="80%"
2345ALIGN="LEFT"
2346VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002347>0 if success, -2 if the transcoding fails, or -1 otherwise
2348The value of <TT
2349CLASS="PARAMETER"
2350><I
2351>inlen</I
2352></TT
2353> after return is the number of octets consumed
Daniel Veillardaf43f632002-03-08 15:05:20 +00002354as the return value is positive, else unpredictable.
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002355The value of <TT
2356CLASS="PARAMETER"
2357><I
2358>outlen</I
2359></TT
2360> after return is the number of ocetes consumed.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002361></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002362></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002363></TABLE
2364><P
2365></P
2366></DIV
2367></DIV
2368><HR><DIV
2369CLASS="REFSECT2"
2370><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002371NAME="AEN24941"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002372></A
2373><H3
2374><A
2375NAME="ISOLAT1TOUTF8"
2376></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002377>isolat1ToUTF8 ()</H3
Daniel Veillarda41123c2001-04-22 19:31:20 +00002378><TABLE
2379BORDER="0"
2380BGCOLOR="#D6E8FF"
2381WIDTH="100%"
2382CELLPADDING="6"
2383><TR
2384><TD
2385><PRE
2386CLASS="PROGRAMLISTING"
2387>int isolat1ToUTF8 (unsigned char *out,
2388 int *outlen,
2389 unsigned char *in,
2390 int *inlen);</PRE
2391></TD
2392></TR
2393></TABLE
2394><P
2395>Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8
2396block of chars out.</P
2397><P
2398></P
2399><DIV
2400CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002401><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002402NAME="AEN24947"><P
Daniel Veillarda41123c2001-04-22 19:31:20 +00002403></P
2404><TABLE
2405BORDER="0"
2406WIDTH="100%"
2407BGCOLOR="#FFD0D0"
2408CELLSPACING="0"
2409CELLPADDING="4"
2410CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002411><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002412><TR
2413><TD
2414WIDTH="20%"
2415ALIGN="RIGHT"
2416VALIGN="TOP"
2417><TT
2418CLASS="PARAMETER"
2419><I
2420>out</I
2421></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002422>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002423><TD
2424WIDTH="80%"
2425ALIGN="LEFT"
2426VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002427> a pointer to an array of bytes to store the result</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002428></TR
2429><TR
2430><TD
2431WIDTH="20%"
2432ALIGN="RIGHT"
2433VALIGN="TOP"
2434><TT
2435CLASS="PARAMETER"
2436><I
2437>outlen</I
2438></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002439>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002440><TD
2441WIDTH="80%"
2442ALIGN="LEFT"
2443VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002444> the length of <TT
2445CLASS="PARAMETER"
2446><I
2447>out</I
2448></TT
2449></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002450></TR
2451><TR
2452><TD
2453WIDTH="20%"
2454ALIGN="RIGHT"
2455VALIGN="TOP"
2456><TT
2457CLASS="PARAMETER"
2458><I
2459>in</I
2460></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002461>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002462><TD
2463WIDTH="80%"
2464ALIGN="LEFT"
2465VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002466> a pointer to an array of ISO Latin 1 chars</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002467></TR
2468><TR
2469><TD
2470WIDTH="20%"
2471ALIGN="RIGHT"
2472VALIGN="TOP"
2473><TT
2474CLASS="PARAMETER"
2475><I
2476>inlen</I
2477></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002478>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002479><TD
2480WIDTH="80%"
2481ALIGN="LEFT"
2482VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002483> the length of <TT
2484CLASS="PARAMETER"
2485><I
2486>in</I
2487></TT
2488></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002489></TR
2490><TR
2491><TD
2492WIDTH="20%"
2493ALIGN="RIGHT"
2494VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002495><SPAN
2496CLASS="emphasis"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002497><I
2498CLASS="EMPHASIS"
2499>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002500></SPAN
Daniel Veillarda41123c2001-04-22 19:31:20 +00002501> :</TD
2502><TD
2503WIDTH="80%"
2504ALIGN="LEFT"
2505VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002506>0 if success, or -1 otherwise
2507The value of <TT
2508CLASS="PARAMETER"
2509><I
2510>inlen</I
2511></TT
2512> after return is the number of octets consumed
Daniel Veillardaf43f632002-03-08 15:05:20 +00002513as the return value is positive, else unpredictable.
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002514The value of <TT
2515CLASS="PARAMETER"
2516><I
2517>outlen</I
2518></TT
2519> after return is the number of ocetes consumed.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002520></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002521></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002522></TABLE
2523><P
2524></P
2525></DIV
2526></DIV
2527><HR><DIV
2528CLASS="REFSECT2"
2529><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002530NAME="AEN24976"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002531></A
2532><H3
2533><A
2534NAME="XMLCHECKUTF8"
2535></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002536>xmlCheckUTF8 ()</H3
Daniel Veillarda41123c2001-04-22 19:31:20 +00002537><TABLE
2538BORDER="0"
2539BGCOLOR="#D6E8FF"
2540WIDTH="100%"
2541CELLPADDING="6"
2542><TR
2543><TD
2544><PRE
2545CLASS="PROGRAMLISTING"
2546>int xmlCheckUTF8 (unsigned char *utf);</PRE
2547></TD
2548></TR
2549></TABLE
2550><P
2551>Checks <TT
2552CLASS="PARAMETER"
2553><I
2554>utf</I
2555></TT
2556> for being valid utf-8. <TT
2557CLASS="PARAMETER"
2558><I
2559>utf</I
2560></TT
2561> is assumed to be
2562null-terminated. This function is not super-strict, as it will
2563allow longer utf-8 sequences than necessary. Note that Java is
2564capable of producing these sequences if provoked. Also note, this
Daniel Veillardcbaf3992001-12-31 16:16:02 +00002565routine checks for the 4-byte maximum size, but does not check for
Daniel Veillarda41123c2001-04-22 19:31:20 +000025660x10ffff maximum value.</P
2567><P
2568></P
2569><DIV
2570CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002571><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002572NAME="AEN24984"><P
Daniel Veillarda41123c2001-04-22 19:31:20 +00002573></P
2574><TABLE
2575BORDER="0"
2576WIDTH="100%"
2577BGCOLOR="#FFD0D0"
2578CELLSPACING="0"
2579CELLPADDING="4"
2580CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002581><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002582><TR
2583><TD
2584WIDTH="20%"
2585ALIGN="RIGHT"
2586VALIGN="TOP"
2587><TT
2588CLASS="PARAMETER"
2589><I
2590>utf</I
2591></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002592>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002593><TD
2594WIDTH="80%"
2595ALIGN="LEFT"
2596VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002597> Pointer to putative utf-8 encoded string.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002598></TR
2599><TR
2600><TD
2601WIDTH="20%"
2602ALIGN="RIGHT"
2603VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002604><SPAN
2605CLASS="emphasis"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002606><I
2607CLASS="EMPHASIS"
2608>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002609></SPAN
Daniel Veillarda41123c2001-04-22 19:31:20 +00002610> :</TD
2611><TD
2612WIDTH="80%"
2613ALIGN="LEFT"
2614VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002615> true if <TT
2616CLASS="PARAMETER"
2617><I
2618>utf</I
2619></TT
2620> is valid.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002621></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002622></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002623></TABLE
2624><P
2625></P
2626></DIV
2627></DIV
2628><HR><DIV
2629CLASS="REFSECT2"
2630><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002631NAME="AEN24998"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002632></A
2633><H3
2634><A
2635NAME="XMLUTF8STRSIZE"
2636></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002637>xmlUTF8Strsize ()</H3
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002638><TABLE
2639BORDER="0"
2640BGCOLOR="#D6E8FF"
2641WIDTH="100%"
2642CELLPADDING="6"
2643><TR
2644><TD
2645><PRE
2646CLASS="PROGRAMLISTING"
2647>int xmlUTF8Strsize (const <A
2648HREF="libxml-tree.html#XMLCHAR"
2649>xmlChar</A
2650> *utf,
2651 int len);</PRE
2652></TD
2653></TR
2654></TABLE
2655><P
2656>storage size of an UTF8 string</P
2657><P
2658></P
2659><DIV
2660CLASS="INFORMALTABLE"
2661><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002662NAME="AEN25005"><P
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002663></P
2664><TABLE
2665BORDER="0"
2666WIDTH="100%"
2667BGCOLOR="#FFD0D0"
2668CELLSPACING="0"
2669CELLPADDING="4"
2670CLASS="CALSTABLE"
2671><TBODY
2672><TR
2673><TD
2674WIDTH="20%"
2675ALIGN="RIGHT"
2676VALIGN="TOP"
2677><TT
2678CLASS="PARAMETER"
2679><I
2680>utf</I
2681></TT
2682>&nbsp;:</TD
2683><TD
2684WIDTH="80%"
2685ALIGN="LEFT"
2686VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002687> a sequence of UTF-8 encoded bytes</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002688></TR
2689><TR
2690><TD
2691WIDTH="20%"
2692ALIGN="RIGHT"
2693VALIGN="TOP"
2694><TT
2695CLASS="PARAMETER"
2696><I
2697>len</I
2698></TT
2699>&nbsp;:</TD
2700><TD
2701WIDTH="80%"
2702ALIGN="LEFT"
2703VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002704> the number of characters in the array</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002705></TR
2706><TR
2707><TD
2708WIDTH="20%"
2709ALIGN="RIGHT"
2710VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002711><SPAN
2712CLASS="emphasis"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002713><I
2714CLASS="EMPHASIS"
2715>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002716></SPAN
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002717> :</TD
2718><TD
2719WIDTH="80%"
2720ALIGN="LEFT"
2721VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002722>the storage size of
2723the first 'len' characters of ARRAY&#13;</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002724></TR
2725></TBODY
2726></TABLE
2727><P
2728></P
2729></DIV
2730></DIV
2731><HR><DIV
2732CLASS="REFSECT2"
2733><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002734NAME="AEN25022"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002735></A
2736><H3
2737><A
2738NAME="XMLUTF8STRNDUP"
2739></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002740>xmlUTF8Strndup ()</H3
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002741><TABLE
2742BORDER="0"
2743BGCOLOR="#D6E8FF"
2744WIDTH="100%"
2745CELLPADDING="6"
2746><TR
2747><TD
2748><PRE
2749CLASS="PROGRAMLISTING"
2750><A
2751HREF="libxml-tree.html#XMLCHAR"
2752>xmlChar</A
2753>* xmlUTF8Strndup (const <A
2754HREF="libxml-tree.html#XMLCHAR"
2755>xmlChar</A
2756> *utf,
2757 int len);</PRE
2758></TD
2759></TR
2760></TABLE
2761><P
2762>a strndup for array of UTF8's</P
2763><P
2764></P
2765><DIV
2766CLASS="INFORMALTABLE"
2767><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002768NAME="AEN25030"><P
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002769></P
2770><TABLE
2771BORDER="0"
2772WIDTH="100%"
2773BGCOLOR="#FFD0D0"
2774CELLSPACING="0"
2775CELLPADDING="4"
2776CLASS="CALSTABLE"
2777><TBODY
2778><TR
2779><TD
2780WIDTH="20%"
2781ALIGN="RIGHT"
2782VALIGN="TOP"
2783><TT
2784CLASS="PARAMETER"
2785><I
2786>utf</I
2787></TT
2788>&nbsp;:</TD
2789><TD
2790WIDTH="80%"
2791ALIGN="LEFT"
2792VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002793> the input UTF8 *</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002794></TR
2795><TR
2796><TD
2797WIDTH="20%"
2798ALIGN="RIGHT"
2799VALIGN="TOP"
2800><TT
2801CLASS="PARAMETER"
2802><I
2803>len</I
2804></TT
2805>&nbsp;:</TD
2806><TD
2807WIDTH="80%"
2808ALIGN="LEFT"
2809VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002810> the len of <TT
2811CLASS="PARAMETER"
2812><I
2813>utf</I
2814></TT
2815> (in chars)</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002816></TR
2817><TR
2818><TD
2819WIDTH="20%"
2820ALIGN="RIGHT"
2821VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002822><SPAN
2823CLASS="emphasis"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002824><I
2825CLASS="EMPHASIS"
2826>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002827></SPAN
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002828> :</TD
2829><TD
2830WIDTH="80%"
2831ALIGN="LEFT"
2832VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002833>a new UTF8 * or NULL</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002834></TR
2835></TBODY
2836></TABLE
2837><P
2838></P
2839></DIV
2840></DIV
2841><HR><DIV
2842CLASS="REFSECT2"
2843><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002844NAME="AEN25048"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002845></A
2846><H3
2847><A
2848NAME="XMLUTF8STRPOS"
2849></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002850>xmlUTF8Strpos ()</H3
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002851><TABLE
2852BORDER="0"
2853BGCOLOR="#D6E8FF"
2854WIDTH="100%"
2855CELLPADDING="6"
2856><TR
2857><TD
2858><PRE
2859CLASS="PROGRAMLISTING"
2860><A
2861HREF="libxml-tree.html#XMLCHAR"
2862>xmlChar</A
2863>* xmlUTF8Strpos (const <A
2864HREF="libxml-tree.html#XMLCHAR"
2865>xmlChar</A
2866> *utf,
2867 int pos);</PRE
2868></TD
2869></TR
2870></TABLE
2871><P
2872>a function to provide the equivalent of fetching a
2873character from a string array</P
2874><P
2875></P
2876><DIV
2877CLASS="INFORMALTABLE"
2878><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002879NAME="AEN25056"><P
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002880></P
2881><TABLE
2882BORDER="0"
2883WIDTH="100%"
2884BGCOLOR="#FFD0D0"
2885CELLSPACING="0"
2886CELLPADDING="4"
2887CLASS="CALSTABLE"
2888><TBODY
2889><TR
2890><TD
2891WIDTH="20%"
2892ALIGN="RIGHT"
2893VALIGN="TOP"
2894><TT
2895CLASS="PARAMETER"
2896><I
2897>utf</I
2898></TT
2899>&nbsp;:</TD
2900><TD
2901WIDTH="80%"
2902ALIGN="LEFT"
2903VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002904> the input UTF8 *</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002905></TR
2906><TR
2907><TD
2908WIDTH="20%"
2909ALIGN="RIGHT"
2910VALIGN="TOP"
2911><TT
2912CLASS="PARAMETER"
2913><I
2914>pos</I
2915></TT
2916>&nbsp;:</TD
2917><TD
2918WIDTH="80%"
2919ALIGN="LEFT"
2920VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002921> the position of the desired UTF8 char (in chars)</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002922></TR
2923><TR
2924><TD
2925WIDTH="20%"
2926ALIGN="RIGHT"
2927VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00002928><SPAN
2929CLASS="emphasis"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002930><I
2931CLASS="EMPHASIS"
2932>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00002933></SPAN
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002934> :</TD
2935><TD
2936WIDTH="80%"
2937ALIGN="LEFT"
2938VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002939>a pointer to the UTF8 character or NULL</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002940></TR
2941></TBODY
2942></TABLE
2943><P
2944></P
2945></DIV
2946></DIV
2947><HR><DIV
2948CLASS="REFSECT2"
2949><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002950NAME="AEN25073"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002951></A
2952><H3
2953><A
2954NAME="XMLUTF8STRLOC"
2955></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00002956>xmlUTF8Strloc ()</H3
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002957><TABLE
2958BORDER="0"
2959BGCOLOR="#D6E8FF"
2960WIDTH="100%"
2961CELLPADDING="6"
2962><TR
2963><TD
2964><PRE
2965CLASS="PROGRAMLISTING"
2966>int xmlUTF8Strloc (const <A
2967HREF="libxml-tree.html#XMLCHAR"
2968>xmlChar</A
2969> *utf,
2970 const <A
2971HREF="libxml-tree.html#XMLCHAR"
2972>xmlChar</A
2973> *utfchar);</PRE
2974></TD
2975></TR
2976></TABLE
2977><P
2978>a function to provide relative location of a UTF8 char</P
2979><P
2980></P
2981><DIV
2982CLASS="INFORMALTABLE"
2983><A
Daniel Veillard539638b2002-07-06 19:55:14 +00002984NAME="AEN25081"><P
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002985></P
2986><TABLE
2987BORDER="0"
2988WIDTH="100%"
2989BGCOLOR="#FFD0D0"
2990CELLSPACING="0"
2991CELLPADDING="4"
2992CLASS="CALSTABLE"
2993><TBODY
2994><TR
2995><TD
2996WIDTH="20%"
2997ALIGN="RIGHT"
2998VALIGN="TOP"
2999><TT
3000CLASS="PARAMETER"
3001><I
3002>utf</I
3003></TT
3004>&nbsp;:</TD
3005><TD
3006WIDTH="80%"
3007ALIGN="LEFT"
3008VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003009> the input UTF8 *</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003010></TR
3011><TR
3012><TD
3013WIDTH="20%"
3014ALIGN="RIGHT"
3015VALIGN="TOP"
3016><TT
3017CLASS="PARAMETER"
3018><I
3019>utfchar</I
3020></TT
3021>&nbsp;:</TD
3022><TD
3023WIDTH="80%"
3024ALIGN="LEFT"
3025VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003026> the UTF8 character to be found</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003027></TR
3028><TR
3029><TD
3030WIDTH="20%"
3031ALIGN="RIGHT"
3032VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00003033><SPAN
3034CLASS="emphasis"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003035><I
3036CLASS="EMPHASIS"
3037>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00003038></SPAN
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003039> :</TD
3040><TD
3041WIDTH="80%"
3042ALIGN="LEFT"
3043VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003044>the relative character position of the desired char
3045or -1 if not found</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003046></TR
3047></TBODY
3048></TABLE
3049><P
3050></P
3051></DIV
3052></DIV
3053><HR><DIV
3054CLASS="REFSECT2"
3055><A
Daniel Veillard539638b2002-07-06 19:55:14 +00003056NAME="AEN25098"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003057></A
3058><H3
3059><A
3060NAME="XMLUTF8STRSUB"
3061></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00003062>xmlUTF8Strsub ()</H3
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003063><TABLE
3064BORDER="0"
3065BGCOLOR="#D6E8FF"
3066WIDTH="100%"
3067CELLPADDING="6"
3068><TR
3069><TD
3070><PRE
3071CLASS="PROGRAMLISTING"
3072><A
3073HREF="libxml-tree.html#XMLCHAR"
3074>xmlChar</A
3075>* xmlUTF8Strsub (const <A
3076HREF="libxml-tree.html#XMLCHAR"
3077>xmlChar</A
3078> *utf,
3079 int start,
3080 int len);</PRE
3081></TD
3082></TR
3083></TABLE
3084><P
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003085>Note: positions are given in units of UTF-8 chars</P
3086><P
3087></P
3088><DIV
3089CLASS="INFORMALTABLE"
3090><A
Daniel Veillard539638b2002-07-06 19:55:14 +00003091NAME="AEN25106"><P
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003092></P
3093><TABLE
3094BORDER="0"
3095WIDTH="100%"
3096BGCOLOR="#FFD0D0"
3097CELLSPACING="0"
3098CELLPADDING="4"
3099CLASS="CALSTABLE"
3100><TBODY
3101><TR
3102><TD
3103WIDTH="20%"
3104ALIGN="RIGHT"
3105VALIGN="TOP"
3106><TT
3107CLASS="PARAMETER"
3108><I
3109>utf</I
3110></TT
3111>&nbsp;:</TD
3112><TD
3113WIDTH="80%"
3114ALIGN="LEFT"
3115VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003116> a sequence of UTF-8 encoded bytes</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003117></TR
3118><TR
3119><TD
3120WIDTH="20%"
3121ALIGN="RIGHT"
3122VALIGN="TOP"
3123><TT
3124CLASS="PARAMETER"
3125><I
3126>start</I
3127></TT
3128>&nbsp;:</TD
3129><TD
3130WIDTH="80%"
3131ALIGN="LEFT"
3132VALIGN="TOP"
Daniel Veillardf012a642001-07-23 19:10:52 +00003133> relative pos of first char</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003134></TR
3135><TR
3136><TD
3137WIDTH="20%"
3138ALIGN="RIGHT"
3139VALIGN="TOP"
3140><TT
3141CLASS="PARAMETER"
3142><I
3143>len</I
3144></TT
3145>&nbsp;:</TD
3146><TD
3147WIDTH="80%"
3148ALIGN="LEFT"
3149VALIGN="TOP"
Daniel Veillardf012a642001-07-23 19:10:52 +00003150> total number to copy</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003151></TR
3152><TR
3153><TD
3154WIDTH="20%"
3155ALIGN="RIGHT"
3156VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00003157><SPAN
3158CLASS="emphasis"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003159><I
3160CLASS="EMPHASIS"
3161>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00003162></SPAN
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003163> :</TD
3164><TD
3165WIDTH="80%"
3166ALIGN="LEFT"
3167VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003168>a pointer to a newly created string
3169or NULL if any problem</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003170></TR
3171></TBODY
3172></TABLE
3173><P
3174></P
3175></DIV
3176></DIV
3177><HR><DIV
3178CLASS="REFSECT2"
3179><A
Daniel Veillard539638b2002-07-06 19:55:14 +00003180NAME="AEN25127"
Daniel Veillarda41123c2001-04-22 19:31:20 +00003181></A
3182><H3
3183><A
3184NAME="XMLUTF8STRLEN"
3185></A
Daniel Veillardaf43f632002-03-08 15:05:20 +00003186>xmlUTF8Strlen ()</H3
Daniel Veillarda41123c2001-04-22 19:31:20 +00003187><TABLE
3188BORDER="0"
3189BGCOLOR="#D6E8FF"
3190WIDTH="100%"
3191CELLPADDING="6"
3192><TR
3193><TD
3194><PRE
3195CLASS="PROGRAMLISTING"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003196>int xmlUTF8Strlen (const <A
3197HREF="libxml-tree.html#XMLCHAR"
3198>xmlChar</A
3199> *utf);</PRE
Daniel Veillarda41123c2001-04-22 19:31:20 +00003200></TD
3201></TR
3202></TABLE
3203><P
Daniel Veillard60087f32001-10-10 09:45:09 +00003204>compute the length of an UTF8 string, it doesn't do a full UTF8
Daniel Veillarda41123c2001-04-22 19:31:20 +00003205checking of the content of the string.</P
3206><P
3207></P
3208><DIV
3209CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00003210><A
Daniel Veillard539638b2002-07-06 19:55:14 +00003211NAME="AEN25134"><P
Daniel Veillarda41123c2001-04-22 19:31:20 +00003212></P
3213><TABLE
3214BORDER="0"
3215WIDTH="100%"
3216BGCOLOR="#FFD0D0"
3217CELLSPACING="0"
3218CELLPADDING="4"
3219CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00003220><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00003221><TR
3222><TD
3223WIDTH="20%"
3224ALIGN="RIGHT"
3225VALIGN="TOP"
3226><TT
3227CLASS="PARAMETER"
3228><I
3229>utf</I
3230></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00003231>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00003232><TD
3233WIDTH="80%"
3234ALIGN="LEFT"
3235VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003236> a sequence of UTF-8 encoded bytes</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00003237></TR
3238><TR
3239><TD
3240WIDTH="20%"
3241ALIGN="RIGHT"
3242VALIGN="TOP"
Daniel Veillard539638b2002-07-06 19:55:14 +00003243><SPAN
3244CLASS="emphasis"
Daniel Veillarda41123c2001-04-22 19:31:20 +00003245><I
3246CLASS="EMPHASIS"
3247>Returns</I
Daniel Veillard539638b2002-07-06 19:55:14 +00003248></SPAN
Daniel Veillarda41123c2001-04-22 19:31:20 +00003249> :</TD
3250><TD
3251WIDTH="80%"
3252ALIGN="LEFT"
3253VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003254>the number of characters in the string or -1 in case of error</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00003255></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00003256></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00003257></TABLE
3258><P
3259></P
3260></DIV
3261></DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +00003262></DIV
3263><DIV
3264CLASS="NAVFOOTER"
3265><BR
3266CLEAR="all"><BR><TABLE
3267WIDTH="100%"
3268BORDER="0"
3269BGCOLOR="#000000"
3270CELLPADDING="1"
3271CELLSPACING="0"
3272><TR
3273><TD
3274WIDTH="25%"
3275BGCOLOR="#C00000"
3276ALIGN="left"
3277><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00003278HREF="libxml-parserinternals.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00003279><FONT
3280COLOR="#FFFFFF"
3281SIZE="3"
3282><B
3283>&#60;&#60;&#60; Previous Page</B
3284></FONT
3285></A
3286></TD
3287><TD
3288WIDTH="25%"
3289BGCOLOR="#0000C0"
3290ALIGN="center"
3291><FONT
3292COLOR="#FFFFFF"
3293SIZE="3"
3294><B
3295><A
3296HREF="book1.html"
3297><FONT
3298COLOR="#FFFFFF"
3299SIZE="3"
3300><B
3301>Home</B
3302></FONT
3303></A
3304></B
3305></FONT
3306></TD
3307><TD
3308WIDTH="25%"
3309BGCOLOR="#00C000"
3310ALIGN="center"
3311><FONT
3312COLOR="#FFFFFF"
3313SIZE="3"
3314><B
3315><A
3316HREF="libxml-lib.html"
3317><FONT
3318COLOR="#FFFFFF"
3319SIZE="3"
3320><B
3321>Up</B
3322></FONT
3323></A
3324></B
3325></FONT
3326></TD
3327><TD
3328WIDTH="25%"
3329BGCOLOR="#C00000"
3330ALIGN="right"
3331><A
Daniel Veillard52dcab32001-10-30 12:51:17 +00003332HREF="libxml-hash.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00003333><FONT
3334COLOR="#FFFFFF"
3335SIZE="3"
3336><B
3337>Next Page &#62;&#62;&#62;</B
3338></FONT
3339></A
3340></TD
3341></TR
3342><TR
3343><TD
3344COLSPAN="2"
3345ALIGN="left"
3346><FONT
3347COLOR="#FFFFFF"
3348SIZE="3"
3349><B
3350>parserInternals</B
3351></FONT
3352></TD
3353><TD
3354COLSPAN="2"
3355ALIGN="right"
3356><FONT
3357COLOR="#FFFFFF"
3358SIZE="3"
3359><B
Daniel Veillard52dcab32001-10-30 12:51:17 +00003360>hash</B
Daniel Veillardaeea04f2000-01-25 19:27:27 +00003361></FONT
3362></TD
3363></TR
3364></TABLE
3365></DIV
3366></BODY
3367></HTML
3368>