blob: c646e0487926b479eb50e9d8190bed2ea0cf34d3 [file] [log] [blame]
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001<HTML
2><HEAD
3><TITLE
4>encoding</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillard60087f32001-10-10 09:45:09 +00007CONTENT="Modular DocBook HTML Stylesheet Version 1.64
8"><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"
19TITLE="debugXML"
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000020HREF="libxml-debugxml.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 Veillard9cb5ff42001-01-29 08:22:21 +0000106HREF="libxml-debugxml.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 Veillard9cb5ff42001-01-29 08:22:21 +0000120NAME="LIBXML-ENCODING"
Daniel Veillard503b8932001-01-05 06:36:31 +0000121>encoding</A
122></H1
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000123><DIV
124CLASS="REFNAMEDIV"
125><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000126NAME="AEN22524"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000127></A
128><H2
129>Name</H2
Daniel Veillard503b8932001-01-05 06:36:31 +0000130>encoding&nbsp;--&nbsp;</DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000131><DIV
132CLASS="REFSYNOPSISDIV"
133><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000134NAME="AEN22527"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000135></A
136><H2
137>Synopsis</H2
138><TABLE
139BORDER="0"
140BGCOLOR="#D6E8FF"
141WIDTH="100%"
142CELLPADDING="6"
143><TR
144><TD
145><PRE
146CLASS="SYNOPSIS"
147>&#13;
148
149enum <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000150HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000151>xmlCharEncoding</A
152>;
153int (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000154HREF="libxml-encoding.html#XMLCHARENCODINGINPUTFUNC"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000155>*xmlCharEncodingInputFunc</A
156>) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000157 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000158 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000159 int *inlen);
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000160int (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000161HREF="libxml-encoding.html#XMLCHARENCODINGOUTPUTFUNC"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000162>*xmlCharEncodingOutputFunc</A
163>) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000164 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000165 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000166 int *inlen);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000167struct <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000168HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000169>xmlCharEncodingHandler</A
170>;
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000171typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000172HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000173>xmlCharEncodingHandlerPtr</A
174>;
175void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000176HREF="libxml-encoding.html#XMLINITCHARENCODINGHANDLERS"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000177>xmlInitCharEncodingHandlers</A
178> (void);
179void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000180HREF="libxml-encoding.html#XMLCLEANUPCHARENCODINGHANDLERS"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000181>xmlCleanupCharEncodingHandlers</A
182> (void);
183void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000184HREF="libxml-encoding.html#XMLREGISTERCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000185>xmlRegisterCharEncodingHandler</A
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> handler);
190<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000191HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000192>xmlCharEncodingHandlerPtr</A
193> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000194HREF="libxml-encoding.html#XMLGETCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000195>xmlGetCharEncodingHandler</A
196>
197 (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000198HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000199>xmlCharEncoding</A
200> enc);
201<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000202HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000203>xmlCharEncodingHandlerPtr</A
204> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000205HREF="libxml-encoding.html#XMLFINDCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000206>xmlFindCharEncodingHandler</A
207>
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000208 (const char *name);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000209int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000210HREF="libxml-encoding.html#XMLADDENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000211>xmlAddEncodingAlias</A
212> (const char *name,
213 const char *alias);
214int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000215HREF="libxml-encoding.html#XMLDELENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000216>xmlDelEncodingAlias</A
217> (const char *alias);
218const char* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000219HREF="libxml-encoding.html#XMLGETENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000220>xmlGetEncodingAlias</A
221> (const char *alias);
222void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000223HREF="libxml-encoding.html#XMLCLEANUPENCODINGALIASES"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000224>xmlCleanupEncodingAliases</A
225> (void);
226<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000227HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000228>xmlCharEncoding</A
229> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000230HREF="libxml-encoding.html#XMLPARSECHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000231>xmlParseCharEncoding</A
232> (const char *name);
233const char* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000234HREF="libxml-encoding.html#XMLGETCHARENCODINGNAME"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000235>xmlGetCharEncodingName</A
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> enc);
240<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000241HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000242>xmlCharEncoding</A
243> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000244HREF="libxml-encoding.html#XMLDETECTCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000245>xmlDetectCharEncoding</A
246> (unsigned char *in,
247 int len);
248int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000249HREF="libxml-encoding.html#XMLCHARENCOUTFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000250>xmlCharEncOutFunc</A
251> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000252HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000253>xmlCharEncodingHandler</A
254> *handler,
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> out,
259 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000260HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000261>xmlBufferPtr</A
262> in);
263int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000264HREF="libxml-encoding.html#XMLCHARENCINFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000265>xmlCharEncInFunc</A
266> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000267HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000268>xmlCharEncodingHandler</A
269> *handler,
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> out,
274 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000275HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000276>xmlBufferPtr</A
277> in);
278int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000279HREF="libxml-encoding.html#XMLCHARENCFIRSTLINE"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000280>xmlCharEncFirstLine</A
281> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000282HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000283>xmlCharEncodingHandler</A
284> *handler,
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> out,
289 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000290HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000291>xmlBufferPtr</A
292> in);
293int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000294HREF="libxml-encoding.html#XMLCHARENCCLOSEFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000295>xmlCharEncCloseFunc</A
296> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000297HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000298>xmlCharEncodingHandler</A
Daniel Veillarda41123c2001-04-22 19:31:20 +0000299> *handler);
300int <A
301HREF="libxml-encoding.html#UTF8TOISOLAT1"
302>UTF8Toisolat1</A
303> (unsigned char *out,
304 int *outlen,
305 unsigned char *in,
306 int *inlen);
307int <A
308HREF="libxml-encoding.html#ISOLAT1TOUTF8"
309>isolat1ToUTF8</A
310> (unsigned char *out,
311 int *outlen,
312 unsigned char *in,
313 int *inlen);
314int <A
315HREF="libxml-encoding.html#XMLCHECKUTF8"
316>xmlCheckUTF8</A
317> (unsigned char *utf);
318int <A
Daniel Veillard4ec885a2001-06-17 10:31:07 +0000319HREF="libxml-encoding.html#XMLUTF8STRSIZE"
320>xmlUTF8Strsize</A
321> (const <A
322HREF="libxml-tree.html#XMLCHAR"
323>xmlChar</A
324> *utf,
325 int len);
326<A
327HREF="libxml-tree.html#XMLCHAR"
328>xmlChar</A
329>* <A
330HREF="libxml-encoding.html#XMLUTF8STRNDUP"
331>xmlUTF8Strndup</A
332> (const <A
333HREF="libxml-tree.html#XMLCHAR"
334>xmlChar</A
335> *utf,
336 int len);
337<A
338HREF="libxml-tree.html#XMLCHAR"
339>xmlChar</A
340>* <A
341HREF="libxml-encoding.html#XMLUTF8STRPOS"
342>xmlUTF8Strpos</A
343> (const <A
344HREF="libxml-tree.html#XMLCHAR"
345>xmlChar</A
346> *utf,
347 int pos);
348int <A
349HREF="libxml-encoding.html#XMLUTF8STRLOC"
350>xmlUTF8Strloc</A
351> (const <A
352HREF="libxml-tree.html#XMLCHAR"
353>xmlChar</A
354> *utf,
355 const <A
356HREF="libxml-tree.html#XMLCHAR"
357>xmlChar</A
358> *utfchar);
359<A
360HREF="libxml-tree.html#XMLCHAR"
361>xmlChar</A
362>* <A
363HREF="libxml-encoding.html#XMLUTF8STRSUB"
364>xmlUTF8Strsub</A
365> (const <A
366HREF="libxml-tree.html#XMLCHAR"
367>xmlChar</A
368> *utf,
369 int start,
370 int len);
371int <A
Daniel Veillarda41123c2001-04-22 19:31:20 +0000372HREF="libxml-encoding.html#XMLUTF8STRLEN"
373>xmlUTF8Strlen</A
Daniel Veillard4ec885a2001-06-17 10:31:07 +0000374> (const <A
375HREF="libxml-tree.html#XMLCHAR"
376>xmlChar</A
377> *utf);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000378></TD
379></TR
380></TABLE
381></DIV
382><DIV
383CLASS="REFSECT1"
384><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000385NAME="AEN22587"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000386></A
387><H2
388>Description</H2
389><P
390></P
391></DIV
392><DIV
393CLASS="REFSECT1"
394><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000395NAME="AEN22590"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000396></A
397><H2
398>Details</H2
399><DIV
400CLASS="REFSECT2"
401><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000402NAME="AEN22592"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000403></A
404><H3
405><A
406NAME="XMLCHARENCODING"
407></A
408>enum xmlCharEncoding</H3
409><TABLE
410BORDER="0"
411BGCOLOR="#D6E8FF"
412WIDTH="100%"
413CELLPADDING="6"
414><TR
415><TD
416><PRE
417CLASS="PROGRAMLISTING"
418>typedef enum {
419 XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
420 XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
421 XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
422 XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
423 XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
424 XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
425 XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
426 XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
427 XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
428 XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
429 XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
430 XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
431 XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
432 XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
433 XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
434 XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
435 XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
436 XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
437 XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
438 XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
439 XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
440 XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
Daniel Veillarde46e20d2000-07-14 15:02:46 +0000441 XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
442 XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000443} xmlCharEncoding;</PRE
444></TD
445></TR
446></TABLE
447><P
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000448>Predefined values for some standard encodings
449Libxml don't do beforehand translation on UTF8, ISOLatinX
450It also support UTF16 (LE and BE) by default.</P
451><P
452>Anything else would have to be translated to UTF8 before being
453given to the parser itself. The BOM for UTF16 and the encoding
454declaration are looked at and a converter is looked for at that
455point. If not found the parser stops here as asked by the XML REC
456Converter can be registered by the user using xmlRegisterCharEncodingHandler
457but the currentl form doesn't allow stateful transcoding (a serious
458problem agreed !). If iconv has been found it will be used
459automatically and allow stateful transcoding, the simplest is then
460to be sure to enable icon and to provide iconv libs for the encoding
461support needed.</P
462><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000463></P
464></DIV
465><HR><DIV
466CLASS="REFSECT2"
467><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000468NAME="AEN22599"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000469></A
470><H3
471><A
472NAME="XMLCHARENCODINGINPUTFUNC"
473></A
474>xmlCharEncodingInputFunc ()</H3
475><TABLE
476BORDER="0"
477BGCOLOR="#D6E8FF"
478WIDTH="100%"
479CELLPADDING="6"
480><TR
481><TD
482><PRE
483CLASS="PROGRAMLISTING"
484>int (*xmlCharEncodingInputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000485 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000486 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000487 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000488></TD
489></TR
490></TABLE
491><P
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000492>Take a block of chars in the original encoding and try to convert
493it to an UTF-8 block of chars out.</P
494><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000495></P
496><DIV
497CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000498><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000499NAME="AEN22605"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000500></A
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000501><P
502></P
503><TABLE
504BORDER="0"
505WIDTH="100%"
506BGCOLOR="#FFD0D0"
507CELLSPACING="0"
508CELLPADDING="4"
509CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000510><TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000511><TR
512><TD
513WIDTH="20%"
514ALIGN="RIGHT"
515VALIGN="TOP"
516><TT
517CLASS="PARAMETER"
518><I
519>out</I
520></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000521>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000522><TD
523WIDTH="80%"
524ALIGN="LEFT"
525VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000526> a pointer ot an array of bytes to store the UTF-8 result</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000527></TR
528><TR
529><TD
530WIDTH="20%"
531ALIGN="RIGHT"
532VALIGN="TOP"
533><TT
534CLASS="PARAMETER"
535><I
536>outlen</I
537></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000538>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000539><TD
540WIDTH="80%"
541ALIGN="LEFT"
542VALIGN="TOP"
Daniel Veillard60087f32001-10-10 09:45:09 +0000543> the length of <TT
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000544CLASS="PARAMETER"
545><I
546>out</I
547></TT
548></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000549></TR
550><TR
551><TD
552WIDTH="20%"
553ALIGN="RIGHT"
554VALIGN="TOP"
555><TT
556CLASS="PARAMETER"
557><I
558>in</I
559></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000560>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000561><TD
562WIDTH="80%"
563ALIGN="LEFT"
564VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000565> a pointer ot an array of chars in the original encoding</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000566></TR
567><TR
568><TD
569WIDTH="20%"
570ALIGN="RIGHT"
571VALIGN="TOP"
572><TT
573CLASS="PARAMETER"
574><I
575>inlen</I
576></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000577>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000578><TD
579WIDTH="80%"
580ALIGN="LEFT"
581VALIGN="TOP"
Daniel Veillard60087f32001-10-10 09:45:09 +0000582> the length of <TT
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000583CLASS="PARAMETER"
584><I
585>in</I
586></TT
587></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000588></TR
589><TR
590><TD
591WIDTH="20%"
592ALIGN="RIGHT"
593VALIGN="TOP"
594><I
595CLASS="EMPHASIS"
596>Returns</I
597> :</TD
598><TD
599WIDTH="80%"
600ALIGN="LEFT"
601VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000602>the number of byte written, or -1 by lack of space, or -2
603if the transcoding failed.
604The value of <TT
605CLASS="PARAMETER"
606><I
607>inlen</I
608></TT
609> after return is the number of octets consumed
610as the return value is positive, else unpredictiable.
611The value of <TT
612CLASS="PARAMETER"
613><I
614>outlen</I
615></TT
616> after return is the number of ocetes consumed.</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000617></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000618></TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000619></TABLE
620><P
621></P
622></DIV
623></DIV
624><HR><DIV
625CLASS="REFSECT2"
626><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000627NAME="AEN22634"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000628></A
629><H3
630><A
631NAME="XMLCHARENCODINGOUTPUTFUNC"
632></A
633>xmlCharEncodingOutputFunc ()</H3
634><TABLE
635BORDER="0"
636BGCOLOR="#D6E8FF"
637WIDTH="100%"
638CELLPADDING="6"
639><TR
640><TD
641><PRE
642CLASS="PROGRAMLISTING"
643>int (*xmlCharEncodingOutputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000644 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000645 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000646 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000647></TD
648></TR
649></TABLE
650><P
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000651>Take a block of UTF-8 chars in and try to convert it to an other
652encoding.
653Note: a first call designed to produce heading info is called with
654in = NULL. If stateful this should also initialize the encoder state</P
655><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000656></P
657><DIV
658CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000659><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000660NAME="AEN22640"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000661></A
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000662><P
663></P
664><TABLE
665BORDER="0"
666WIDTH="100%"
667BGCOLOR="#FFD0D0"
668CELLSPACING="0"
669CELLPADDING="4"
670CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000671><TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000672><TR
673><TD
674WIDTH="20%"
675ALIGN="RIGHT"
676VALIGN="TOP"
677><TT
678CLASS="PARAMETER"
679><I
680>out</I
681></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000682>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000683><TD
684WIDTH="80%"
685ALIGN="LEFT"
686VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000687> a pointer ot an array of bytes to store the result</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000688></TR
689><TR
690><TD
691WIDTH="20%"
692ALIGN="RIGHT"
693VALIGN="TOP"
694><TT
695CLASS="PARAMETER"
696><I
697>outlen</I
698></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000699>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000700><TD
701WIDTH="80%"
702ALIGN="LEFT"
703VALIGN="TOP"
Daniel Veillard60087f32001-10-10 09:45:09 +0000704> the length of <TT
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000705CLASS="PARAMETER"
706><I
707>out</I
708></TT
709></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000710></TR
711><TR
712><TD
713WIDTH="20%"
714ALIGN="RIGHT"
715VALIGN="TOP"
716><TT
717CLASS="PARAMETER"
718><I
719>in</I
720></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000721>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000722><TD
723WIDTH="80%"
724ALIGN="LEFT"
725VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000726> a pointer ot an array of UTF-8 chars</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000727></TR
728><TR
729><TD
730WIDTH="20%"
731ALIGN="RIGHT"
732VALIGN="TOP"
733><TT
734CLASS="PARAMETER"
735><I
736>inlen</I
737></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000738>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000739><TD
740WIDTH="80%"
741ALIGN="LEFT"
742VALIGN="TOP"
Daniel Veillard60087f32001-10-10 09:45:09 +0000743> the length of <TT
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000744CLASS="PARAMETER"
745><I
746>in</I
747></TT
748></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000749></TR
750><TR
751><TD
752WIDTH="20%"
753ALIGN="RIGHT"
754VALIGN="TOP"
755><I
756CLASS="EMPHASIS"
757>Returns</I
758> :</TD
759><TD
760WIDTH="80%"
761ALIGN="LEFT"
762VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000763>the number of byte written, or -1 by lack of space, or -2
764if the transcoding failed.
765The value of <TT
766CLASS="PARAMETER"
767><I
768>inlen</I
769></TT
770> after return is the number of octets consumed
771as the return value is positive, else unpredictiable.
772The value of <TT
773CLASS="PARAMETER"
774><I
775>outlen</I
776></TT
777> after return is the number of ocetes consumed.</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000778></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000779></TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000780></TABLE
781><P
782></P
783></DIV
784></DIV
785><HR><DIV
786CLASS="REFSECT2"
787><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000788NAME="AEN22669"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000789></A
790><H3
791><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000792NAME="XMLCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000793></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000794>struct xmlCharEncodingHandler</H3
795><TABLE
796BORDER="0"
797BGCOLOR="#D6E8FF"
798WIDTH="100%"
799CELLPADDING="6"
800><TR
801><TD
802><PRE
803CLASS="PROGRAMLISTING"
804>struct xmlCharEncodingHandler {
805 char *name;
806 xmlCharEncodingInputFunc input;
807 xmlCharEncodingOutputFunc output;
808#ifdef LIBXML_ICONV_ENABLED
809 iconv_t iconv_in;
810 iconv_t iconv_out;
811#endif /* LIBXML_ICONV_ENABLED */
812};</PRE
813></TD
814></TR
815></TABLE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000816><P
817></P
818></DIV
819><HR><DIV
820CLASS="REFSECT2"
821><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000822NAME="AEN22674"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000823></A
824><H3
825><A
826NAME="XMLCHARENCODINGHANDLERPTR"
827></A
828>xmlCharEncodingHandlerPtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000829><TABLE
830BORDER="0"
831BGCOLOR="#D6E8FF"
832WIDTH="100%"
833CELLPADDING="6"
834><TR
835><TD
836><PRE
837CLASS="PROGRAMLISTING"
838>typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;</PRE
839></TD
840></TR
841></TABLE
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000842><P
843></P
844></DIV
845><HR><DIV
846CLASS="REFSECT2"
847><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000848NAME="AEN22679"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000849></A
850><H3
851><A
852NAME="XMLINITCHARENCODINGHANDLERS"
853></A
854>xmlInitCharEncodingHandlers ()</H3
855><TABLE
856BORDER="0"
857BGCOLOR="#D6E8FF"
858WIDTH="100%"
859CELLPADDING="6"
860><TR
861><TD
862><PRE
863CLASS="PROGRAMLISTING"
864>void xmlInitCharEncodingHandlers (void);</PRE
865></TD
866></TR
867></TABLE
868><P
869>Initialize the char encoding support, it registers the default
870encoding supported.
871NOTE: while public, this function usually doesn't need to be called
872in normal processing.</P
873><P
874></P
875></DIV
876><HR><DIV
877CLASS="REFSECT2"
878><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000879NAME="AEN22685"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000880></A
881><H3
882><A
883NAME="XMLCLEANUPCHARENCODINGHANDLERS"
884></A
885>xmlCleanupCharEncodingHandlers ()</H3
886><TABLE
887BORDER="0"
888BGCOLOR="#D6E8FF"
889WIDTH="100%"
890CELLPADDING="6"
891><TR
892><TD
893><PRE
894CLASS="PROGRAMLISTING"
895>void xmlCleanupCharEncodingHandlers (void);</PRE
896></TD
897></TR
898></TABLE
899><P
900>Cleanup the memory allocated for the char encoding support, it
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000901unregisters all the encoding handlers and the aliases.</P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000902><P
903></P
904></DIV
905><HR><DIV
906CLASS="REFSECT2"
907><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000908NAME="AEN22691"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000909></A
910><H3
911><A
912NAME="XMLREGISTERCHARENCODINGHANDLER"
913></A
914>xmlRegisterCharEncodingHandler ()</H3
915><TABLE
916BORDER="0"
917BGCOLOR="#D6E8FF"
918WIDTH="100%"
919CELLPADDING="6"
920><TR
921><TD
922><PRE
923CLASS="PROGRAMLISTING"
924>void xmlRegisterCharEncodingHandler (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000925HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000926>xmlCharEncodingHandlerPtr</A
927> handler);</PRE
928></TD
929></TR
930></TABLE
931><P
932>Register the char encoding handler, surprizing, isn't it ?</P
933><P
934></P
935><DIV
936CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000937><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000938NAME="AEN22698"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000939></A
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000940><P
941></P
942><TABLE
943BORDER="0"
944WIDTH="100%"
945BGCOLOR="#FFD0D0"
946CELLSPACING="0"
947CELLPADDING="4"
948CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000949><TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000950><TR
951><TD
952WIDTH="20%"
953ALIGN="RIGHT"
954VALIGN="TOP"
955><TT
956CLASS="PARAMETER"
957><I
958>handler</I
959></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000960>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000961><TD
962WIDTH="80%"
963ALIGN="LEFT"
964VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000965> the xmlCharEncodingHandlerPtr handler block</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000966></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000967></TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000968></TABLE
969><P
970></P
971></DIV
972></DIV
973><HR><DIV
974CLASS="REFSECT2"
975><A
Daniel Veillard60087f32001-10-10 09:45:09 +0000976NAME="AEN22707"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000977></A
978><H3
979><A
980NAME="XMLGETCHARENCODINGHANDLER"
981></A
982>xmlGetCharEncodingHandler ()</H3
983><TABLE
984BORDER="0"
985BGCOLOR="#D6E8FF"
986WIDTH="100%"
987CELLPADDING="6"
988><TR
989><TD
990><PRE
991CLASS="PROGRAMLISTING"
992><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000993HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000994>xmlCharEncodingHandlerPtr</A
995> xmlGetCharEncodingHandler
996 (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000997HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000998>xmlCharEncoding</A
999> enc);</PRE
1000></TD
1001></TR
1002></TABLE
1003><P
1004>Search in the registrered set the handler able to read/write that encoding.</P
1005><P
1006></P
1007><DIV
1008CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001009><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001010NAME="AEN22715"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001011></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001012><P
1013></P
1014><TABLE
1015BORDER="0"
1016WIDTH="100%"
1017BGCOLOR="#FFD0D0"
1018CELLSPACING="0"
1019CELLPADDING="4"
1020CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001021><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001022><TR
1023><TD
1024WIDTH="20%"
1025ALIGN="RIGHT"
1026VALIGN="TOP"
1027><TT
1028CLASS="PARAMETER"
1029><I
1030>enc</I
1031></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001032>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001033><TD
1034WIDTH="80%"
1035ALIGN="LEFT"
1036VALIGN="TOP"
Daniel Veillardf012a642001-07-23 19:10:52 +00001037> an xmlCharEncoding value.</TD
1038></TR
1039><TR
1040><TD
1041WIDTH="20%"
1042ALIGN="RIGHT"
1043VALIGN="TOP"
1044><I
1045CLASS="EMPHASIS"
1046>Returns</I
1047> :</TD
1048><TD
1049WIDTH="80%"
1050ALIGN="LEFT"
1051VALIGN="TOP"
1052>the handler or NULL if not found</TD
1053></TR
1054></TBODY
1055></TABLE
1056><P
1057></P
1058></DIV
1059></DIV
1060><HR><DIV
1061CLASS="REFSECT2"
1062><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001063NAME="AEN22728"
Daniel Veillardf012a642001-07-23 19:10:52 +00001064></A
1065><H3
1066><A
1067NAME="XMLFINDCHARENCODINGHANDLER"
1068></A
1069>xmlFindCharEncodingHandler ()</H3
1070><TABLE
1071BORDER="0"
1072BGCOLOR="#D6E8FF"
1073WIDTH="100%"
1074CELLPADDING="6"
1075><TR
1076><TD
1077><PRE
1078CLASS="PROGRAMLISTING"
1079><A
1080HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
1081>xmlCharEncodingHandlerPtr</A
1082> xmlFindCharEncodingHandler
1083 (const char *name);</PRE
1084></TD
1085></TR
1086></TABLE
1087><P
1088>Search in the registrered set the handler able to read/write that encoding.</P
1089><P
1090></P
1091><DIV
1092CLASS="INFORMALTABLE"
1093><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001094NAME="AEN22735"
Daniel Veillardf012a642001-07-23 19:10:52 +00001095></A
1096><P
1097></P
1098><TABLE
1099BORDER="0"
1100WIDTH="100%"
1101BGCOLOR="#FFD0D0"
1102CELLSPACING="0"
1103CELLPADDING="4"
1104CLASS="CALSTABLE"
1105><TBODY
1106><TR
1107><TD
1108WIDTH="20%"
1109ALIGN="RIGHT"
1110VALIGN="TOP"
1111><TT
1112CLASS="PARAMETER"
1113><I
1114>name</I
1115></TT
1116>&nbsp;:</TD
1117><TD
1118WIDTH="80%"
1119ALIGN="LEFT"
1120VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001121> a string describing the char encoding.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001122></TR
1123><TR
1124><TD
1125WIDTH="20%"
1126ALIGN="RIGHT"
1127VALIGN="TOP"
1128><I
1129CLASS="EMPHASIS"
1130>Returns</I
1131> :</TD
1132><TD
1133WIDTH="80%"
1134ALIGN="LEFT"
1135VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001136>the handler or NULL if not found</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001137></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001138></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001139></TABLE
1140><P
1141></P
1142></DIV
1143></DIV
1144><HR><DIV
1145CLASS="REFSECT2"
1146><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001147NAME="AEN22748"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001148></A
1149><H3
1150><A
1151NAME="XMLADDENCODINGALIAS"
1152></A
1153>xmlAddEncodingAlias ()</H3
1154><TABLE
1155BORDER="0"
1156BGCOLOR="#D6E8FF"
1157WIDTH="100%"
1158CELLPADDING="6"
1159><TR
1160><TD
1161><PRE
1162CLASS="PROGRAMLISTING"
1163>int xmlAddEncodingAlias (const char *name,
1164 const char *alias);</PRE
1165></TD
1166></TR
1167></TABLE
1168><P
1169>Registers and alias <TT
1170CLASS="PARAMETER"
1171><I
1172>alias</I
1173></TT
1174> for an encoding named <TT
1175CLASS="PARAMETER"
1176><I
1177>name</I
1178></TT
1179>. Existing alias
1180will be overwritten.</P
1181><P
1182></P
1183><DIV
1184CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001185><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001186NAME="AEN22756"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001187></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001188><P
1189></P
1190><TABLE
1191BORDER="0"
1192WIDTH="100%"
1193BGCOLOR="#FFD0D0"
1194CELLSPACING="0"
1195CELLPADDING="4"
1196CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001197><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001198><TR
1199><TD
1200WIDTH="20%"
1201ALIGN="RIGHT"
1202VALIGN="TOP"
1203><TT
1204CLASS="PARAMETER"
1205><I
1206>name</I
1207></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001208>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001209><TD
1210WIDTH="80%"
1211ALIGN="LEFT"
1212VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001213> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001214></TR
1215><TR
1216><TD
1217WIDTH="20%"
1218ALIGN="RIGHT"
1219VALIGN="TOP"
1220><TT
1221CLASS="PARAMETER"
1222><I
1223>alias</I
1224></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001225>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001226><TD
1227WIDTH="80%"
1228ALIGN="LEFT"
1229VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001230> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001231></TR
1232><TR
1233><TD
1234WIDTH="20%"
1235ALIGN="RIGHT"
1236VALIGN="TOP"
1237><I
1238CLASS="EMPHASIS"
1239>Returns</I
1240> :</TD
1241><TD
1242WIDTH="80%"
1243ALIGN="LEFT"
1244VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001245>0 in case of success, -1 in case of error</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001246></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001247></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001248></TABLE
1249><P
1250></P
1251></DIV
1252></DIV
1253><HR><DIV
1254CLASS="REFSECT2"
1255><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001256NAME="AEN22773"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001257></A
1258><H3
1259><A
1260NAME="XMLDELENCODINGALIAS"
1261></A
1262>xmlDelEncodingAlias ()</H3
1263><TABLE
1264BORDER="0"
1265BGCOLOR="#D6E8FF"
1266WIDTH="100%"
1267CELLPADDING="6"
1268><TR
1269><TD
1270><PRE
1271CLASS="PROGRAMLISTING"
1272>int xmlDelEncodingAlias (const char *alias);</PRE
1273></TD
1274></TR
1275></TABLE
1276><P
1277>Unregisters an encoding alias <TT
1278CLASS="PARAMETER"
1279><I
1280>alias</I
1281></TT
1282></P
1283><P
1284></P
1285><DIV
1286CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001287><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001288NAME="AEN22780"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001289></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001290><P
1291></P
1292><TABLE
1293BORDER="0"
1294WIDTH="100%"
1295BGCOLOR="#FFD0D0"
1296CELLSPACING="0"
1297CELLPADDING="4"
1298CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001299><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001300><TR
1301><TD
1302WIDTH="20%"
1303ALIGN="RIGHT"
1304VALIGN="TOP"
1305><TT
1306CLASS="PARAMETER"
1307><I
1308>alias</I
1309></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001310>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001311><TD
1312WIDTH="80%"
1313ALIGN="LEFT"
1314VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001315> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001316></TR
1317><TR
1318><TD
1319WIDTH="20%"
1320ALIGN="RIGHT"
1321VALIGN="TOP"
1322><I
1323CLASS="EMPHASIS"
1324>Returns</I
1325> :</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 Veillard60087f32001-10-10 09:45:09 +00001341NAME="AEN22793"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001342></A
1343><H3
1344><A
1345NAME="XMLGETENCODINGALIAS"
1346></A
1347>xmlGetEncodingAlias ()</H3
1348><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 Veillard60087f32001-10-10 09:45:09 +00001368NAME="AEN22799"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001369></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001370><P
1371></P
1372><TABLE
1373BORDER="0"
1374WIDTH="100%"
1375BGCOLOR="#FFD0D0"
1376CELLSPACING="0"
1377CELLPADDING="4"
1378CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001379><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001380><TR
1381><TD
1382WIDTH="20%"
1383ALIGN="RIGHT"
1384VALIGN="TOP"
1385><TT
1386CLASS="PARAMETER"
1387><I
1388>alias</I
1389></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001390>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001391><TD
1392WIDTH="80%"
1393ALIGN="LEFT"
1394VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001395> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001396></TR
1397><TR
1398><TD
1399WIDTH="20%"
1400ALIGN="RIGHT"
1401VALIGN="TOP"
1402><I
1403CLASS="EMPHASIS"
1404>Returns</I
1405> :</TD
1406><TD
1407WIDTH="80%"
1408ALIGN="LEFT"
1409VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001410>NULL if not found the original name otherwise</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001411></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001412></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001413></TABLE
1414><P
1415></P
1416></DIV
1417></DIV
1418><HR><DIV
1419CLASS="REFSECT2"
1420><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001421NAME="AEN22812"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001422></A
1423><H3
1424><A
1425NAME="XMLCLEANUPENCODINGALIASES"
1426></A
1427>xmlCleanupEncodingAliases ()</H3
1428><TABLE
1429BORDER="0"
1430BGCOLOR="#D6E8FF"
1431WIDTH="100%"
1432CELLPADDING="6"
1433><TR
1434><TD
1435><PRE
1436CLASS="PROGRAMLISTING"
1437>void xmlCleanupEncodingAliases (void);</PRE
1438></TD
1439></TR
1440></TABLE
1441><P
1442>Unregisters all aliases</P
1443><P
1444></P
1445></DIV
1446><HR><DIV
1447CLASS="REFSECT2"
1448><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001449NAME="AEN22818"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001450></A
1451><H3
1452><A
1453NAME="XMLPARSECHARENCODING"
1454></A
1455>xmlParseCharEncoding ()</H3
1456><TABLE
1457BORDER="0"
1458BGCOLOR="#D6E8FF"
1459WIDTH="100%"
1460CELLPADDING="6"
1461><TR
1462><TD
1463><PRE
1464CLASS="PROGRAMLISTING"
1465><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001466HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001467>xmlCharEncoding</A
1468> xmlParseCharEncoding (const char *name);</PRE
1469></TD
1470></TR
1471></TABLE
1472><P
1473>Conpare the string to the known encoding schemes already known. Note
1474that the comparison is case insensitive accordingly to the section
1475[XML] 4.3.3 Character Encoding in Entities.</P
1476><P
1477></P
1478><DIV
1479CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001480><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001481NAME="AEN22825"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001482></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001483><P
1484></P
1485><TABLE
1486BORDER="0"
1487WIDTH="100%"
1488BGCOLOR="#FFD0D0"
1489CELLSPACING="0"
1490CELLPADDING="4"
1491CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001492><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001493><TR
1494><TD
1495WIDTH="20%"
1496ALIGN="RIGHT"
1497VALIGN="TOP"
1498><TT
1499CLASS="PARAMETER"
1500><I
1501>name</I
1502></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001503>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001504><TD
1505WIDTH="80%"
1506ALIGN="LEFT"
1507VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001508> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001509></TR
1510><TR
1511><TD
1512WIDTH="20%"
1513ALIGN="RIGHT"
1514VALIGN="TOP"
1515><I
1516CLASS="EMPHASIS"
1517>Returns</I
1518> :</TD
1519><TD
1520WIDTH="80%"
1521ALIGN="LEFT"
1522VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001523>one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE
1524if not recognized.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001525></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001526></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001527></TABLE
1528><P
1529></P
1530></DIV
1531></DIV
1532><HR><DIV
1533CLASS="REFSECT2"
1534><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001535NAME="AEN22838"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001536></A
1537><H3
1538><A
1539NAME="XMLGETCHARENCODINGNAME"
1540></A
1541>xmlGetCharEncodingName ()</H3
1542><TABLE
1543BORDER="0"
1544BGCOLOR="#D6E8FF"
1545WIDTH="100%"
1546CELLPADDING="6"
1547><TR
1548><TD
1549><PRE
1550CLASS="PROGRAMLISTING"
1551>const char* xmlGetCharEncodingName (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001552HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001553>xmlCharEncoding</A
1554> enc);</PRE
1555></TD
1556></TR
1557></TABLE
1558><P
1559>The "canonical" name for XML encoding.
1560C.f. http://www.w3.org/TR/REC-xml<GTKDOCLINK
1561HREF="CHARENCODING"
1562>charencoding</GTKDOCLINK
1563>
1564Section 4.3.3 Character Encoding in Entities</P
1565><P
1566></P
1567><DIV
1568CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001569><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001570NAME="AEN22846"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001571></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001572><P
1573></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"
1604><I
1605CLASS="EMPHASIS"
1606>Returns</I
1607> :</TD
1608><TD
1609WIDTH="80%"
1610ALIGN="LEFT"
1611VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001612>the canonical name for the given encoding</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001613></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001614></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001615></TABLE
1616><P
1617></P
1618></DIV
1619></DIV
1620><HR><DIV
1621CLASS="REFSECT2"
1622><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001623NAME="AEN22859"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001624></A
1625><H3
1626><A
1627NAME="XMLDETECTCHARENCODING"
1628></A
1629>xmlDetectCharEncoding ()</H3
1630><TABLE
1631BORDER="0"
1632BGCOLOR="#D6E8FF"
1633WIDTH="100%"
1634CELLPADDING="6"
1635><TR
1636><TD
1637><PRE
1638CLASS="PROGRAMLISTING"
1639><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001640HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001641>xmlCharEncoding</A
1642> xmlDetectCharEncoding (unsigned char *in,
1643 int len);</PRE
1644></TD
1645></TR
1646></TABLE
1647><P
1648>Guess the encoding of the entity using the first bytes of the entity content
1649accordingly of the non-normative appendix F of the XML-1.0 recommendation.</P
1650><P
1651></P
1652><DIV
1653CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001654><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001655NAME="AEN22866"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001656></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001657><P
1658></P
1659><TABLE
1660BORDER="0"
1661WIDTH="100%"
1662BGCOLOR="#FFD0D0"
1663CELLSPACING="0"
1664CELLPADDING="4"
1665CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001666><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001667><TR
1668><TD
1669WIDTH="20%"
1670ALIGN="RIGHT"
1671VALIGN="TOP"
1672><TT
1673CLASS="PARAMETER"
1674><I
1675>in</I
1676></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001677>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001678><TD
1679WIDTH="80%"
1680ALIGN="LEFT"
1681VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001682> a pointer to the first bytes of the XML entity, must be at least
16834 bytes long.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001684></TR
1685><TR
1686><TD
1687WIDTH="20%"
1688ALIGN="RIGHT"
1689VALIGN="TOP"
1690><TT
1691CLASS="PARAMETER"
1692><I
1693>len</I
1694></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001695>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001696><TD
1697WIDTH="80%"
1698ALIGN="LEFT"
1699VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001700> pointer to the length of the buffer</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001701></TR
1702><TR
1703><TD
1704WIDTH="20%"
1705ALIGN="RIGHT"
1706VALIGN="TOP"
1707><I
1708CLASS="EMPHASIS"
1709>Returns</I
1710> :</TD
1711><TD
1712WIDTH="80%"
1713ALIGN="LEFT"
1714VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001715>one of the XML_CHAR_ENCODING_... values.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001716></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001717></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001718></TABLE
1719><P
1720></P
1721></DIV
1722></DIV
1723><HR><DIV
1724CLASS="REFSECT2"
1725><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001726NAME="AEN22883"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001727></A
1728><H3
1729><A
1730NAME="XMLCHARENCOUTFUNC"
1731></A
1732>xmlCharEncOutFunc ()</H3
1733><TABLE
1734BORDER="0"
1735BGCOLOR="#D6E8FF"
1736WIDTH="100%"
1737CELLPADDING="6"
1738><TR
1739><TD
1740><PRE
1741CLASS="PROGRAMLISTING"
1742>int xmlCharEncOutFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001743HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001744>xmlCharEncodingHandler</A
1745> *handler,
1746 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001747HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001748>xmlBufferPtr</A
1749> out,
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> in);</PRE
1754></TD
1755></TR
1756></TABLE
1757><P
1758>Generic front-end for the encoding handler output function
1759a first call with <TT
1760CLASS="PARAMETER"
1761><I
1762>in</I
1763></TT
1764> == NULL has to be made firs to initiate the
1765output in case of non-stateless encoding needing to initiate their
1766state or the output (like the BOM in UTF16).
1767In case of UTF8 sequence conversion errors for the given encoder,
1768the content will be automatically remapped to a CharRef sequence.</P
1769><P
1770></P
1771><DIV
1772CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001773><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001774NAME="AEN22893"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001775></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001776><P
1777></P
1778><TABLE
1779BORDER="0"
1780WIDTH="100%"
1781BGCOLOR="#FFD0D0"
1782CELLSPACING="0"
1783CELLPADDING="4"
1784CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001785><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001786><TR
1787><TD
1788WIDTH="20%"
1789ALIGN="RIGHT"
1790VALIGN="TOP"
1791><TT
1792CLASS="PARAMETER"
1793><I
1794>handler</I
1795></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001796>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001797><TD
1798WIDTH="80%"
1799ALIGN="LEFT"
1800VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001801> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001802></TR
1803><TR
1804><TD
1805WIDTH="20%"
1806ALIGN="RIGHT"
1807VALIGN="TOP"
1808><TT
1809CLASS="PARAMETER"
1810><I
1811>out</I
1812></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001813>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001814><TD
1815WIDTH="80%"
1816ALIGN="LEFT"
1817VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001818> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001819></TR
1820><TR
1821><TD
1822WIDTH="20%"
1823ALIGN="RIGHT"
1824VALIGN="TOP"
1825><TT
1826CLASS="PARAMETER"
1827><I
Daniel Veillard06047432000-04-24 11:33:38 +00001828>in</I
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001829></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001830>&nbsp;:</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001831><TD
1832WIDTH="80%"
1833ALIGN="LEFT"
1834VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001835> an xmlBuffer for the input</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001836></TR
1837><TR
1838><TD
1839WIDTH="20%"
1840ALIGN="RIGHT"
1841VALIGN="TOP"
1842><I
1843CLASS="EMPHASIS"
1844>Returns</I
1845> :</TD
1846><TD
1847WIDTH="80%"
1848ALIGN="LEFT"
1849VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001850>the number of byte written if success, or
1851-1 general error
1852-2 if the transcoding fails (for *in is not valid utf8 string or
1853the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001854></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001855></TBODY
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001856></TABLE
1857><P
1858></P
1859></DIV
1860></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00001861><HR><DIV
1862CLASS="REFSECT2"
1863><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001864NAME="AEN22914"
Daniel Veillard06047432000-04-24 11:33:38 +00001865></A
1866><H3
1867><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001868NAME="XMLCHARENCINFUNC"
Daniel Veillard06047432000-04-24 11:33:38 +00001869></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001870>xmlCharEncInFunc ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001871><TABLE
1872BORDER="0"
1873BGCOLOR="#D6E8FF"
1874WIDTH="100%"
1875CELLPADDING="6"
1876><TR
1877><TD
1878><PRE
1879CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001880>int xmlCharEncInFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001881HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001882>xmlCharEncodingHandler</A
1883> *handler,
1884 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001885HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001886>xmlBufferPtr</A
1887> out,
1888 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001889HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001890>xmlBufferPtr</A
1891> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001892></TD
1893></TR
1894></TABLE
1895><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001896>Generic front-end for the encoding handler input function</P
Daniel Veillard06047432000-04-24 11:33:38 +00001897><P
1898></P
1899><DIV
1900CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001901><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001902NAME="AEN22923"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001903></A
Daniel Veillard06047432000-04-24 11:33:38 +00001904><P
1905></P
1906><TABLE
1907BORDER="0"
1908WIDTH="100%"
1909BGCOLOR="#FFD0D0"
1910CELLSPACING="0"
1911CELLPADDING="4"
1912CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001913><TBODY
Daniel Veillard06047432000-04-24 11:33:38 +00001914><TR
1915><TD
1916WIDTH="20%"
1917ALIGN="RIGHT"
1918VALIGN="TOP"
1919><TT
1920CLASS="PARAMETER"
1921><I
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001922>handler</I
Daniel Veillard06047432000-04-24 11:33:38 +00001923></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001924>&nbsp;:</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001925><TD
1926WIDTH="80%"
1927ALIGN="LEFT"
1928VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001929> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001930></TR
1931><TR
1932><TD
1933WIDTH="20%"
1934ALIGN="RIGHT"
1935VALIGN="TOP"
1936><TT
1937CLASS="PARAMETER"
1938><I
1939>out</I
1940></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001941>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001942><TD
1943WIDTH="80%"
1944ALIGN="LEFT"
1945VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001946> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001947></TR
1948><TR
1949><TD
1950WIDTH="20%"
1951ALIGN="RIGHT"
1952VALIGN="TOP"
1953><TT
1954CLASS="PARAMETER"
1955><I
1956>in</I
1957></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001958>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001959><TD
1960WIDTH="80%"
1961ALIGN="LEFT"
1962VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001963> an xmlBuffer for the input</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001964></TR
1965><TR
1966><TD
1967WIDTH="20%"
1968ALIGN="RIGHT"
1969VALIGN="TOP"
1970><I
1971CLASS="EMPHASIS"
1972>Returns</I
1973> :</TD
1974><TD
1975WIDTH="80%"
1976ALIGN="LEFT"
1977VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001978>the number of byte written if success, or
1979-1 general error
1980-2 if the transcoding fails (for *in is not valid utf8 string or
1981the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001982></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001983></TBODY
Daniel Veillard06047432000-04-24 11:33:38 +00001984></TABLE
1985><P
1986></P
1987></DIV
1988></DIV
1989><HR><DIV
1990CLASS="REFSECT2"
1991><A
Daniel Veillard60087f32001-10-10 09:45:09 +00001992NAME="AEN22944"
Daniel Veillard06047432000-04-24 11:33:38 +00001993></A
1994><H3
1995><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001996NAME="XMLCHARENCFIRSTLINE"
Daniel Veillard06047432000-04-24 11:33:38 +00001997></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001998>xmlCharEncFirstLine ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001999><TABLE
2000BORDER="0"
2001BGCOLOR="#D6E8FF"
2002WIDTH="100%"
2003CELLPADDING="6"
2004><TR
2005><TD
2006><PRE
2007CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002008>int xmlCharEncFirstLine (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002009HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002010>xmlCharEncodingHandler</A
2011> *handler,
2012 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002013HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002014>xmlBufferPtr</A
2015> out,
2016 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002017HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002018>xmlBufferPtr</A
2019> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00002020></TD
2021></TR
2022></TABLE
2023><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002024>Front-end for the encoding handler input function, but handle only
2025the very first line, i.e. limit itself to 45 chars.</P
Daniel Veillard06047432000-04-24 11:33:38 +00002026><P
2027></P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002028><DIV
2029CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002030><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002031NAME="AEN22953"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002032></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002033><P
2034></P
2035><TABLE
2036BORDER="0"
2037WIDTH="100%"
2038BGCOLOR="#FFD0D0"
2039CELLSPACING="0"
2040CELLPADDING="4"
2041CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002042><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002043><TR
2044><TD
2045WIDTH="20%"
2046ALIGN="RIGHT"
2047VALIGN="TOP"
2048><TT
2049CLASS="PARAMETER"
2050><I
2051>handler</I
2052></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002053>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002054><TD
2055WIDTH="80%"
2056ALIGN="LEFT"
2057VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002058> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002059></TR
2060><TR
2061><TD
2062WIDTH="20%"
2063ALIGN="RIGHT"
2064VALIGN="TOP"
2065><TT
2066CLASS="PARAMETER"
2067><I
2068>out</I
2069></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002070>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002071><TD
2072WIDTH="80%"
2073ALIGN="LEFT"
2074VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002075> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002076></TR
2077><TR
2078><TD
2079WIDTH="20%"
2080ALIGN="RIGHT"
2081VALIGN="TOP"
2082><TT
2083CLASS="PARAMETER"
2084><I
2085>in</I
2086></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002087>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002088><TD
2089WIDTH="80%"
2090ALIGN="LEFT"
2091VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002092> an xmlBuffer for the input</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002093></TR
2094><TR
2095><TD
2096WIDTH="20%"
2097ALIGN="RIGHT"
2098VALIGN="TOP"
2099><I
2100CLASS="EMPHASIS"
2101>Returns</I
2102> :</TD
2103><TD
2104WIDTH="80%"
2105ALIGN="LEFT"
2106VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002107>the number of byte written if success, or
2108-1 general error
2109-2 if the transcoding fails (for *in is not valid utf8 string or
2110the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002111></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002112></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002113></TABLE
2114><P
2115></P
2116></DIV
2117></DIV
2118><HR><DIV
2119CLASS="REFSECT2"
2120><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002121NAME="AEN22974"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002122></A
2123><H3
2124><A
2125NAME="XMLCHARENCCLOSEFUNC"
2126></A
2127>xmlCharEncCloseFunc ()</H3
2128><TABLE
2129BORDER="0"
2130BGCOLOR="#D6E8FF"
2131WIDTH="100%"
2132CELLPADDING="6"
2133><TR
2134><TD
2135><PRE
2136CLASS="PROGRAMLISTING"
2137>int xmlCharEncCloseFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002138HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002139>xmlCharEncodingHandler</A
2140> *handler);</PRE
2141></TD
2142></TR
2143></TABLE
2144><P
2145>Generic front-end for hencoding handler close function</P
2146><P
2147></P
2148><DIV
2149CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002150><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002151NAME="AEN22981"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002152></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002153><P
2154></P
2155><TABLE
2156BORDER="0"
2157WIDTH="100%"
2158BGCOLOR="#FFD0D0"
2159CELLSPACING="0"
2160CELLPADDING="4"
2161CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002162><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002163><TR
2164><TD
2165WIDTH="20%"
2166ALIGN="RIGHT"
2167VALIGN="TOP"
2168><TT
2169CLASS="PARAMETER"
2170><I
2171>handler</I
2172></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002173>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002174><TD
2175WIDTH="80%"
2176ALIGN="LEFT"
2177VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002178> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002179></TR
2180><TR
2181><TD
2182WIDTH="20%"
2183ALIGN="RIGHT"
2184VALIGN="TOP"
2185><I
2186CLASS="EMPHASIS"
2187>Returns</I
2188> :</TD
2189><TD
2190WIDTH="80%"
2191ALIGN="LEFT"
2192VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002193>0 if success, or -1 in case of error</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002194></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002195></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002196></TABLE
2197><P
2198></P
2199></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00002200></DIV
Daniel Veillarda41123c2001-04-22 19:31:20 +00002201><HR><DIV
2202CLASS="REFSECT2"
2203><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002204NAME="AEN22994"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002205></A
2206><H3
2207><A
2208NAME="UTF8TOISOLAT1"
2209></A
2210>UTF8Toisolat1 ()</H3
2211><TABLE
2212BORDER="0"
2213BGCOLOR="#D6E8FF"
2214WIDTH="100%"
2215CELLPADDING="6"
2216><TR
2217><TD
2218><PRE
2219CLASS="PROGRAMLISTING"
2220>int UTF8Toisolat1 (unsigned char *out,
2221 int *outlen,
2222 unsigned char *in,
2223 int *inlen);</PRE
2224></TD
2225></TR
2226></TABLE
2227><P
2228>Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1
2229block of chars out.</P
2230><P
2231></P
2232><DIV
2233CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002234><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002235NAME="AEN23000"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002236></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00002237><P
2238></P
2239><TABLE
2240BORDER="0"
2241WIDTH="100%"
2242BGCOLOR="#FFD0D0"
2243CELLSPACING="0"
2244CELLPADDING="4"
2245CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002246><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002247><TR
2248><TD
2249WIDTH="20%"
2250ALIGN="RIGHT"
2251VALIGN="TOP"
2252><TT
2253CLASS="PARAMETER"
2254><I
2255>out</I
2256></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002257>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002258><TD
2259WIDTH="80%"
2260ALIGN="LEFT"
2261VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002262> a pointer to an array of bytes to store the result</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002263></TR
2264><TR
2265><TD
2266WIDTH="20%"
2267ALIGN="RIGHT"
2268VALIGN="TOP"
2269><TT
2270CLASS="PARAMETER"
2271><I
2272>outlen</I
2273></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002274>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002275><TD
2276WIDTH="80%"
2277ALIGN="LEFT"
2278VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002279> the length of <TT
2280CLASS="PARAMETER"
2281><I
2282>out</I
2283></TT
2284></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002285></TR
2286><TR
2287><TD
2288WIDTH="20%"
2289ALIGN="RIGHT"
2290VALIGN="TOP"
2291><TT
2292CLASS="PARAMETER"
2293><I
2294>in</I
2295></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002296>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002297><TD
2298WIDTH="80%"
2299ALIGN="LEFT"
2300VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002301> a pointer to an array of UTF-8 chars</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002302></TR
2303><TR
2304><TD
2305WIDTH="20%"
2306ALIGN="RIGHT"
2307VALIGN="TOP"
2308><TT
2309CLASS="PARAMETER"
2310><I
2311>inlen</I
2312></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002313>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002314><TD
2315WIDTH="80%"
2316ALIGN="LEFT"
2317VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002318> the length of <TT
2319CLASS="PARAMETER"
2320><I
2321>in</I
2322></TT
2323></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002324></TR
2325><TR
2326><TD
2327WIDTH="20%"
2328ALIGN="RIGHT"
2329VALIGN="TOP"
2330><I
2331CLASS="EMPHASIS"
2332>Returns</I
2333> :</TD
2334><TD
2335WIDTH="80%"
2336ALIGN="LEFT"
2337VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002338>0 if success, -2 if the transcoding fails, or -1 otherwise
2339The value of <TT
2340CLASS="PARAMETER"
2341><I
2342>inlen</I
2343></TT
2344> after return is the number of octets consumed
2345as the return value is positive, else unpredictiable.
2346The value of <TT
2347CLASS="PARAMETER"
2348><I
2349>outlen</I
2350></TT
2351> after return is the number of ocetes consumed.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002352></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002353></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002354></TABLE
2355><P
2356></P
2357></DIV
2358></DIV
2359><HR><DIV
2360CLASS="REFSECT2"
2361><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002362NAME="AEN23029"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002363></A
2364><H3
2365><A
2366NAME="ISOLAT1TOUTF8"
2367></A
2368>isolat1ToUTF8 ()</H3
2369><TABLE
2370BORDER="0"
2371BGCOLOR="#D6E8FF"
2372WIDTH="100%"
2373CELLPADDING="6"
2374><TR
2375><TD
2376><PRE
2377CLASS="PROGRAMLISTING"
2378>int isolat1ToUTF8 (unsigned char *out,
2379 int *outlen,
2380 unsigned char *in,
2381 int *inlen);</PRE
2382></TD
2383></TR
2384></TABLE
2385><P
2386>Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8
2387block of chars out.</P
2388><P
2389></P
2390><DIV
2391CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002392><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002393NAME="AEN23035"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002394></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00002395><P
2396></P
2397><TABLE
2398BORDER="0"
2399WIDTH="100%"
2400BGCOLOR="#FFD0D0"
2401CELLSPACING="0"
2402CELLPADDING="4"
2403CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002404><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002405><TR
2406><TD
2407WIDTH="20%"
2408ALIGN="RIGHT"
2409VALIGN="TOP"
2410><TT
2411CLASS="PARAMETER"
2412><I
2413>out</I
2414></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002415>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002416><TD
2417WIDTH="80%"
2418ALIGN="LEFT"
2419VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002420> a pointer to an array of bytes to store the result</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002421></TR
2422><TR
2423><TD
2424WIDTH="20%"
2425ALIGN="RIGHT"
2426VALIGN="TOP"
2427><TT
2428CLASS="PARAMETER"
2429><I
2430>outlen</I
2431></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002432>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002433><TD
2434WIDTH="80%"
2435ALIGN="LEFT"
2436VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002437> the length of <TT
2438CLASS="PARAMETER"
2439><I
2440>out</I
2441></TT
2442></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002443></TR
2444><TR
2445><TD
2446WIDTH="20%"
2447ALIGN="RIGHT"
2448VALIGN="TOP"
2449><TT
2450CLASS="PARAMETER"
2451><I
2452>in</I
2453></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002454>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002455><TD
2456WIDTH="80%"
2457ALIGN="LEFT"
2458VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002459> a pointer to an array of ISO Latin 1 chars</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002460></TR
2461><TR
2462><TD
2463WIDTH="20%"
2464ALIGN="RIGHT"
2465VALIGN="TOP"
2466><TT
2467CLASS="PARAMETER"
2468><I
2469>inlen</I
2470></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002471>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002472><TD
2473WIDTH="80%"
2474ALIGN="LEFT"
2475VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002476> the length of <TT
2477CLASS="PARAMETER"
2478><I
2479>in</I
2480></TT
2481></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002482></TR
2483><TR
2484><TD
2485WIDTH="20%"
2486ALIGN="RIGHT"
2487VALIGN="TOP"
2488><I
2489CLASS="EMPHASIS"
2490>Returns</I
2491> :</TD
2492><TD
2493WIDTH="80%"
2494ALIGN="LEFT"
2495VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002496>0 if success, or -1 otherwise
2497The value of <TT
2498CLASS="PARAMETER"
2499><I
2500>inlen</I
2501></TT
2502> after return is the number of octets consumed
2503as the return value is positive, else unpredictiable.
2504The value of <TT
2505CLASS="PARAMETER"
2506><I
2507>outlen</I
2508></TT
2509> after return is the number of ocetes consumed.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002510></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002511></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002512></TABLE
2513><P
2514></P
2515></DIV
2516></DIV
2517><HR><DIV
2518CLASS="REFSECT2"
2519><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002520NAME="AEN23064"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002521></A
2522><H3
2523><A
2524NAME="XMLCHECKUTF8"
2525></A
2526>xmlCheckUTF8 ()</H3
2527><TABLE
2528BORDER="0"
2529BGCOLOR="#D6E8FF"
2530WIDTH="100%"
2531CELLPADDING="6"
2532><TR
2533><TD
2534><PRE
2535CLASS="PROGRAMLISTING"
2536>int xmlCheckUTF8 (unsigned char *utf);</PRE
2537></TD
2538></TR
2539></TABLE
2540><P
2541>Checks <TT
2542CLASS="PARAMETER"
2543><I
2544>utf</I
2545></TT
2546> for being valid utf-8. <TT
2547CLASS="PARAMETER"
2548><I
2549>utf</I
2550></TT
2551> is assumed to be
2552null-terminated. This function is not super-strict, as it will
2553allow longer utf-8 sequences than necessary. Note that Java is
2554capable of producing these sequences if provoked. Also note, this
2555routine checks for the 4-byte maxiumum size, but does not check for
25560x10ffff maximum value.</P
2557><P
2558></P
2559><DIV
2560CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002561><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002562NAME="AEN23072"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002563></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00002564><P
2565></P
2566><TABLE
2567BORDER="0"
2568WIDTH="100%"
2569BGCOLOR="#FFD0D0"
2570CELLSPACING="0"
2571CELLPADDING="4"
2572CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002573><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002574><TR
2575><TD
2576WIDTH="20%"
2577ALIGN="RIGHT"
2578VALIGN="TOP"
2579><TT
2580CLASS="PARAMETER"
2581><I
2582>utf</I
2583></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002584>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002585><TD
2586WIDTH="80%"
2587ALIGN="LEFT"
2588VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002589> Pointer to putative utf-8 encoded string.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002590></TR
2591><TR
2592><TD
2593WIDTH="20%"
2594ALIGN="RIGHT"
2595VALIGN="TOP"
2596><I
2597CLASS="EMPHASIS"
2598>Returns</I
2599> :</TD
2600><TD
2601WIDTH="80%"
2602ALIGN="LEFT"
2603VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002604> true if <TT
2605CLASS="PARAMETER"
2606><I
2607>utf</I
2608></TT
2609> is valid.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002610></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002611></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002612></TABLE
2613><P
2614></P
2615></DIV
2616></DIV
2617><HR><DIV
2618CLASS="REFSECT2"
2619><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002620NAME="AEN23086"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002621></A
2622><H3
2623><A
2624NAME="XMLUTF8STRSIZE"
2625></A
2626>xmlUTF8Strsize ()</H3
2627><TABLE
2628BORDER="0"
2629BGCOLOR="#D6E8FF"
2630WIDTH="100%"
2631CELLPADDING="6"
2632><TR
2633><TD
2634><PRE
2635CLASS="PROGRAMLISTING"
2636>int xmlUTF8Strsize (const <A
2637HREF="libxml-tree.html#XMLCHAR"
2638>xmlChar</A
2639> *utf,
2640 int len);</PRE
2641></TD
2642></TR
2643></TABLE
2644><P
2645>storage size of an UTF8 string</P
2646><P
2647></P
2648><DIV
2649CLASS="INFORMALTABLE"
2650><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002651NAME="AEN23093"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002652></A
2653><P
2654></P
2655><TABLE
2656BORDER="0"
2657WIDTH="100%"
2658BGCOLOR="#FFD0D0"
2659CELLSPACING="0"
2660CELLPADDING="4"
2661CLASS="CALSTABLE"
2662><TBODY
2663><TR
2664><TD
2665WIDTH="20%"
2666ALIGN="RIGHT"
2667VALIGN="TOP"
2668><TT
2669CLASS="PARAMETER"
2670><I
2671>utf</I
2672></TT
2673>&nbsp;:</TD
2674><TD
2675WIDTH="80%"
2676ALIGN="LEFT"
2677VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002678> a sequence of UTF-8 encoded bytes</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002679></TR
2680><TR
2681><TD
2682WIDTH="20%"
2683ALIGN="RIGHT"
2684VALIGN="TOP"
2685><TT
2686CLASS="PARAMETER"
2687><I
2688>len</I
2689></TT
2690>&nbsp;:</TD
2691><TD
2692WIDTH="80%"
2693ALIGN="LEFT"
2694VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002695> the number of characters in the array</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002696></TR
2697><TR
2698><TD
2699WIDTH="20%"
2700ALIGN="RIGHT"
2701VALIGN="TOP"
2702><I
2703CLASS="EMPHASIS"
2704>Returns</I
2705> :</TD
2706><TD
2707WIDTH="80%"
2708ALIGN="LEFT"
2709VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002710>the storage size of
2711the first 'len' characters of ARRAY&#13;</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002712></TR
2713></TBODY
2714></TABLE
2715><P
2716></P
2717></DIV
2718></DIV
2719><HR><DIV
2720CLASS="REFSECT2"
2721><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002722NAME="AEN23110"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002723></A
2724><H3
2725><A
2726NAME="XMLUTF8STRNDUP"
2727></A
2728>xmlUTF8Strndup ()</H3
2729><TABLE
2730BORDER="0"
2731BGCOLOR="#D6E8FF"
2732WIDTH="100%"
2733CELLPADDING="6"
2734><TR
2735><TD
2736><PRE
2737CLASS="PROGRAMLISTING"
2738><A
2739HREF="libxml-tree.html#XMLCHAR"
2740>xmlChar</A
2741>* xmlUTF8Strndup (const <A
2742HREF="libxml-tree.html#XMLCHAR"
2743>xmlChar</A
2744> *utf,
2745 int len);</PRE
2746></TD
2747></TR
2748></TABLE
2749><P
2750>a strndup for array of UTF8's</P
2751><P
2752></P
2753><DIV
2754CLASS="INFORMALTABLE"
2755><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002756NAME="AEN23118"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002757></A
2758><P
2759></P
2760><TABLE
2761BORDER="0"
2762WIDTH="100%"
2763BGCOLOR="#FFD0D0"
2764CELLSPACING="0"
2765CELLPADDING="4"
2766CLASS="CALSTABLE"
2767><TBODY
2768><TR
2769><TD
2770WIDTH="20%"
2771ALIGN="RIGHT"
2772VALIGN="TOP"
2773><TT
2774CLASS="PARAMETER"
2775><I
2776>utf</I
2777></TT
2778>&nbsp;:</TD
2779><TD
2780WIDTH="80%"
2781ALIGN="LEFT"
2782VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002783> the input UTF8 *</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002784></TR
2785><TR
2786><TD
2787WIDTH="20%"
2788ALIGN="RIGHT"
2789VALIGN="TOP"
2790><TT
2791CLASS="PARAMETER"
2792><I
2793>len</I
2794></TT
2795>&nbsp;:</TD
2796><TD
2797WIDTH="80%"
2798ALIGN="LEFT"
2799VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002800> the len of <TT
2801CLASS="PARAMETER"
2802><I
2803>utf</I
2804></TT
2805> (in chars)</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002806></TR
2807><TR
2808><TD
2809WIDTH="20%"
2810ALIGN="RIGHT"
2811VALIGN="TOP"
2812><I
2813CLASS="EMPHASIS"
2814>Returns</I
2815> :</TD
2816><TD
2817WIDTH="80%"
2818ALIGN="LEFT"
2819VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002820>a new UTF8 * or NULL</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002821></TR
2822></TBODY
2823></TABLE
2824><P
2825></P
2826></DIV
2827></DIV
2828><HR><DIV
2829CLASS="REFSECT2"
2830><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002831NAME="AEN23136"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002832></A
2833><H3
2834><A
2835NAME="XMLUTF8STRPOS"
2836></A
2837>xmlUTF8Strpos ()</H3
2838><TABLE
2839BORDER="0"
2840BGCOLOR="#D6E8FF"
2841WIDTH="100%"
2842CELLPADDING="6"
2843><TR
2844><TD
2845><PRE
2846CLASS="PROGRAMLISTING"
2847><A
2848HREF="libxml-tree.html#XMLCHAR"
2849>xmlChar</A
2850>* xmlUTF8Strpos (const <A
2851HREF="libxml-tree.html#XMLCHAR"
2852>xmlChar</A
2853> *utf,
2854 int pos);</PRE
2855></TD
2856></TR
2857></TABLE
2858><P
2859>a function to provide the equivalent of fetching a
2860character from a string array</P
2861><P
2862></P
2863><DIV
2864CLASS="INFORMALTABLE"
2865><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002866NAME="AEN23144"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002867></A
2868><P
2869></P
2870><TABLE
2871BORDER="0"
2872WIDTH="100%"
2873BGCOLOR="#FFD0D0"
2874CELLSPACING="0"
2875CELLPADDING="4"
2876CLASS="CALSTABLE"
2877><TBODY
2878><TR
2879><TD
2880WIDTH="20%"
2881ALIGN="RIGHT"
2882VALIGN="TOP"
2883><TT
2884CLASS="PARAMETER"
2885><I
2886>utf</I
2887></TT
2888>&nbsp;:</TD
2889><TD
2890WIDTH="80%"
2891ALIGN="LEFT"
2892VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002893> the input UTF8 *</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002894></TR
2895><TR
2896><TD
2897WIDTH="20%"
2898ALIGN="RIGHT"
2899VALIGN="TOP"
2900><TT
2901CLASS="PARAMETER"
2902><I
2903>pos</I
2904></TT
2905>&nbsp;:</TD
2906><TD
2907WIDTH="80%"
2908ALIGN="LEFT"
2909VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002910> the position of the desired UTF8 char (in chars)</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002911></TR
2912><TR
2913><TD
2914WIDTH="20%"
2915ALIGN="RIGHT"
2916VALIGN="TOP"
2917><I
2918CLASS="EMPHASIS"
2919>Returns</I
2920> :</TD
2921><TD
2922WIDTH="80%"
2923ALIGN="LEFT"
2924VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002925>a pointer to the UTF8 character or NULL</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002926></TR
2927></TBODY
2928></TABLE
2929><P
2930></P
2931></DIV
2932></DIV
2933><HR><DIV
2934CLASS="REFSECT2"
2935><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002936NAME="AEN23161"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002937></A
2938><H3
2939><A
2940NAME="XMLUTF8STRLOC"
2941></A
2942>xmlUTF8Strloc ()</H3
2943><TABLE
2944BORDER="0"
2945BGCOLOR="#D6E8FF"
2946WIDTH="100%"
2947CELLPADDING="6"
2948><TR
2949><TD
2950><PRE
2951CLASS="PROGRAMLISTING"
2952>int xmlUTF8Strloc (const <A
2953HREF="libxml-tree.html#XMLCHAR"
2954>xmlChar</A
2955> *utf,
2956 const <A
2957HREF="libxml-tree.html#XMLCHAR"
2958>xmlChar</A
2959> *utfchar);</PRE
2960></TD
2961></TR
2962></TABLE
2963><P
2964>a function to provide relative location of a UTF8 char</P
2965><P
2966></P
2967><DIV
2968CLASS="INFORMALTABLE"
2969><A
Daniel Veillard60087f32001-10-10 09:45:09 +00002970NAME="AEN23169"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002971></A
2972><P
2973></P
2974><TABLE
2975BORDER="0"
2976WIDTH="100%"
2977BGCOLOR="#FFD0D0"
2978CELLSPACING="0"
2979CELLPADDING="4"
2980CLASS="CALSTABLE"
2981><TBODY
2982><TR
2983><TD
2984WIDTH="20%"
2985ALIGN="RIGHT"
2986VALIGN="TOP"
2987><TT
2988CLASS="PARAMETER"
2989><I
2990>utf</I
2991></TT
2992>&nbsp;:</TD
2993><TD
2994WIDTH="80%"
2995ALIGN="LEFT"
2996VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002997> the input UTF8 *</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002998></TR
2999><TR
3000><TD
3001WIDTH="20%"
3002ALIGN="RIGHT"
3003VALIGN="TOP"
3004><TT
3005CLASS="PARAMETER"
3006><I
3007>utfchar</I
3008></TT
3009>&nbsp;:</TD
3010><TD
3011WIDTH="80%"
3012ALIGN="LEFT"
3013VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003014> the UTF8 character to be found</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003015></TR
3016><TR
3017><TD
3018WIDTH="20%"
3019ALIGN="RIGHT"
3020VALIGN="TOP"
3021><I
3022CLASS="EMPHASIS"
3023>Returns</I
3024> :</TD
3025><TD
3026WIDTH="80%"
3027ALIGN="LEFT"
3028VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003029>the relative character position of the desired char
3030or -1 if not found</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003031></TR
3032></TBODY
3033></TABLE
3034><P
3035></P
3036></DIV
3037></DIV
3038><HR><DIV
3039CLASS="REFSECT2"
3040><A
Daniel Veillard60087f32001-10-10 09:45:09 +00003041NAME="AEN23186"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003042></A
3043><H3
3044><A
3045NAME="XMLUTF8STRSUB"
3046></A
3047>xmlUTF8Strsub ()</H3
3048><TABLE
3049BORDER="0"
3050BGCOLOR="#D6E8FF"
3051WIDTH="100%"
3052CELLPADDING="6"
3053><TR
3054><TD
3055><PRE
3056CLASS="PROGRAMLISTING"
3057><A
3058HREF="libxml-tree.html#XMLCHAR"
3059>xmlChar</A
3060>* xmlUTF8Strsub (const <A
3061HREF="libxml-tree.html#XMLCHAR"
3062>xmlChar</A
3063> *utf,
3064 int start,
3065 int len);</PRE
3066></TD
3067></TR
3068></TABLE
3069><P
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003070>Note: positions are given in units of UTF-8 chars</P
3071><P
3072></P
3073><DIV
3074CLASS="INFORMALTABLE"
3075><A
Daniel Veillard60087f32001-10-10 09:45:09 +00003076NAME="AEN23194"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003077></A
3078><P
3079></P
3080><TABLE
3081BORDER="0"
3082WIDTH="100%"
3083BGCOLOR="#FFD0D0"
3084CELLSPACING="0"
3085CELLPADDING="4"
3086CLASS="CALSTABLE"
3087><TBODY
3088><TR
3089><TD
3090WIDTH="20%"
3091ALIGN="RIGHT"
3092VALIGN="TOP"
3093><TT
3094CLASS="PARAMETER"
3095><I
3096>utf</I
3097></TT
3098>&nbsp;:</TD
3099><TD
3100WIDTH="80%"
3101ALIGN="LEFT"
3102VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003103> a sequence of UTF-8 encoded bytes</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003104></TR
3105><TR
3106><TD
3107WIDTH="20%"
3108ALIGN="RIGHT"
3109VALIGN="TOP"
3110><TT
3111CLASS="PARAMETER"
3112><I
3113>start</I
3114></TT
3115>&nbsp;:</TD
3116><TD
3117WIDTH="80%"
3118ALIGN="LEFT"
3119VALIGN="TOP"
Daniel Veillardf012a642001-07-23 19:10:52 +00003120> relative pos of first char</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003121></TR
3122><TR
3123><TD
3124WIDTH="20%"
3125ALIGN="RIGHT"
3126VALIGN="TOP"
3127><TT
3128CLASS="PARAMETER"
3129><I
3130>len</I
3131></TT
3132>&nbsp;:</TD
3133><TD
3134WIDTH="80%"
3135ALIGN="LEFT"
3136VALIGN="TOP"
Daniel Veillardf012a642001-07-23 19:10:52 +00003137> total number to copy</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003138></TR
3139><TR
3140><TD
3141WIDTH="20%"
3142ALIGN="RIGHT"
3143VALIGN="TOP"
3144><I
3145CLASS="EMPHASIS"
3146>Returns</I
3147> :</TD
3148><TD
3149WIDTH="80%"
3150ALIGN="LEFT"
3151VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003152>a pointer to a newly created string
3153or NULL if any problem</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003154></TR
3155></TBODY
3156></TABLE
3157><P
3158></P
3159></DIV
3160></DIV
3161><HR><DIV
3162CLASS="REFSECT2"
3163><A
Daniel Veillard60087f32001-10-10 09:45:09 +00003164NAME="AEN23215"
Daniel Veillarda41123c2001-04-22 19:31:20 +00003165></A
3166><H3
3167><A
3168NAME="XMLUTF8STRLEN"
3169></A
3170>xmlUTF8Strlen ()</H3
3171><TABLE
3172BORDER="0"
3173BGCOLOR="#D6E8FF"
3174WIDTH="100%"
3175CELLPADDING="6"
3176><TR
3177><TD
3178><PRE
3179CLASS="PROGRAMLISTING"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003180>int xmlUTF8Strlen (const <A
3181HREF="libxml-tree.html#XMLCHAR"
3182>xmlChar</A
3183> *utf);</PRE
Daniel Veillarda41123c2001-04-22 19:31:20 +00003184></TD
3185></TR
3186></TABLE
3187><P
Daniel Veillard60087f32001-10-10 09:45:09 +00003188>compute the length of an UTF8 string, it doesn't do a full UTF8
Daniel Veillarda41123c2001-04-22 19:31:20 +00003189checking of the content of the string.</P
3190><P
3191></P
3192><DIV
3193CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00003194><A
Daniel Veillard60087f32001-10-10 09:45:09 +00003195NAME="AEN23222"
Daniel Veillardbed7b052001-05-19 14:59:49 +00003196></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00003197><P
3198></P
3199><TABLE
3200BORDER="0"
3201WIDTH="100%"
3202BGCOLOR="#FFD0D0"
3203CELLSPACING="0"
3204CELLPADDING="4"
3205CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00003206><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00003207><TR
3208><TD
3209WIDTH="20%"
3210ALIGN="RIGHT"
3211VALIGN="TOP"
3212><TT
3213CLASS="PARAMETER"
3214><I
3215>utf</I
3216></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00003217>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00003218><TD
3219WIDTH="80%"
3220ALIGN="LEFT"
3221VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003222> a sequence of UTF-8 encoded bytes</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00003223></TR
3224><TR
3225><TD
3226WIDTH="20%"
3227ALIGN="RIGHT"
3228VALIGN="TOP"
3229><I
3230CLASS="EMPHASIS"
3231>Returns</I
3232> :</TD
3233><TD
3234WIDTH="80%"
3235ALIGN="LEFT"
3236VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003237>the number of characters in the string or -1 in case of error</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00003238></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00003239></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00003240></TABLE
3241><P
3242></P
3243></DIV
3244></DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +00003245></DIV
3246><DIV
3247CLASS="NAVFOOTER"
3248><BR
3249CLEAR="all"><BR><TABLE
3250WIDTH="100%"
3251BORDER="0"
3252BGCOLOR="#000000"
3253CELLPADDING="1"
3254CELLSPACING="0"
3255><TR
3256><TD
3257WIDTH="25%"
3258BGCOLOR="#C00000"
3259ALIGN="left"
3260><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00003261HREF="libxml-parserinternals.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00003262><FONT
3263COLOR="#FFFFFF"
3264SIZE="3"
3265><B
3266>&#60;&#60;&#60; Previous Page</B
3267></FONT
3268></A
3269></TD
3270><TD
3271WIDTH="25%"
3272BGCOLOR="#0000C0"
3273ALIGN="center"
3274><FONT
3275COLOR="#FFFFFF"
3276SIZE="3"
3277><B
3278><A
3279HREF="book1.html"
3280><FONT
3281COLOR="#FFFFFF"
3282SIZE="3"
3283><B
3284>Home</B
3285></FONT
3286></A
3287></B
3288></FONT
3289></TD
3290><TD
3291WIDTH="25%"
3292BGCOLOR="#00C000"
3293ALIGN="center"
3294><FONT
3295COLOR="#FFFFFF"
3296SIZE="3"
3297><B
3298><A
3299HREF="libxml-lib.html"
3300><FONT
3301COLOR="#FFFFFF"
3302SIZE="3"
3303><B
3304>Up</B
3305></FONT
3306></A
3307></B
3308></FONT
3309></TD
3310><TD
3311WIDTH="25%"
3312BGCOLOR="#C00000"
3313ALIGN="right"
3314><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00003315HREF="libxml-debugxml.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00003316><FONT
3317COLOR="#FFFFFF"
3318SIZE="3"
3319><B
3320>Next Page &#62;&#62;&#62;</B
3321></FONT
3322></A
3323></TD
3324></TR
3325><TR
3326><TD
3327COLSPAN="2"
3328ALIGN="left"
3329><FONT
3330COLOR="#FFFFFF"
3331SIZE="3"
3332><B
3333>parserInternals</B
3334></FONT
3335></TD
3336><TD
3337COLSPAN="2"
3338ALIGN="right"
3339><FONT
3340COLOR="#FFFFFF"
3341SIZE="3"
3342><B
3343>debugXML</B
3344></FONT
3345></TD
3346></TR
3347></TABLE
3348></DIV
3349></BODY
3350></HTML
3351>