blob: a0572060ec51e621f505d2d514d3fb1f596e87b4 [file] [log] [blame]
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001<HTML
2><HEAD
3><TITLE
4>encoding</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillardbed7b052001-05-19 14:59:49 +00007CONTENT="Modular DocBook HTML Stylesheet Version 1.59"><LINK
Daniel Veillardaeea04f2000-01-25 19:27:27 +00008REL="HOME"
9TITLE="Gnome XML Library Reference Manual"
10HREF="book1.html"><LINK
11REL="UP"
12TITLE="Libxml Library Reference"
13HREF="libxml-lib.html"><LINK
14REL="PREVIOUS"
15TITLE="parserInternals"
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000016HREF="libxml-parserinternals.html"><LINK
Daniel Veillardaeea04f2000-01-25 19:27:27 +000017REL="NEXT"
18TITLE="debugXML"
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000019HREF="libxml-debugxml.html"></HEAD
Daniel Veillardaeea04f2000-01-25 19:27:27 +000020><BODY
Daniel Veillardbed7b052001-05-19 14:59:49 +000021CLASS="REFENTRY"
Daniel Veillardaeea04f2000-01-25 19:27:27 +000022BGCOLOR="#FFFFFF"
23TEXT="#000000"
Daniel Veillard503b8932001-01-05 06:36:31 +000024LINK="#0000FF"
25VLINK="#840084"
26ALINK="#0000FF"
Daniel Veillardaeea04f2000-01-25 19:27:27 +000027><DIV
28CLASS="NAVHEADER"
29><TABLE
30WIDTH="100%"
31BORDER="0"
32BGCOLOR="#000000"
33CELLPADDING="1"
34CELLSPACING="0"
35><TR
36><TH
37COLSPAN="4"
38ALIGN="center"
39><FONT
40COLOR="#FFFFFF"
41SIZE="5"
42>Gnome XML Library Reference Manual</FONT
43></TH
44></TR
45><TR
46><TD
47WIDTH="25%"
48BGCOLOR="#C00000"
49ALIGN="left"
50><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000051HREF="libxml-parserinternals.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +000052><FONT
53COLOR="#FFFFFF"
54SIZE="3"
55><B
56>&#60;&#60;&#60; Previous Page</B
57></FONT
58></A
59></TD
60><TD
61WIDTH="25%"
62BGCOLOR="#0000C0"
63ALIGN="center"
64><FONT
65COLOR="#FFFFFF"
66SIZE="3"
67><B
68><A
69HREF="book1.html"
70><FONT
71COLOR="#FFFFFF"
72SIZE="3"
73><B
74>Home</B
75></FONT
76></A
77></B
78></FONT
79></TD
80><TD
81WIDTH="25%"
82BGCOLOR="#00C000"
83ALIGN="center"
84><FONT
85COLOR="#FFFFFF"
86SIZE="3"
87><B
88><A
89HREF="libxml-lib.html"
90><FONT
91COLOR="#FFFFFF"
92SIZE="3"
93><B
94>Up</B
95></FONT
96></A
97></B
98></FONT
99></TD
100><TD
101WIDTH="25%"
102BGCOLOR="#C00000"
103ALIGN="right"
104><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000105HREF="libxml-debugxml.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000106><FONT
107COLOR="#FFFFFF"
108SIZE="3"
109><B
110>Next Page &#62;&#62;&#62;</B
111></FONT
112></A
113></TD
114></TR
115></TABLE
116></DIV
117><H1
Daniel Veillard503b8932001-01-05 06:36:31 +0000118><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000119NAME="LIBXML-ENCODING"
Daniel Veillard503b8932001-01-05 06:36:31 +0000120>encoding</A
121></H1
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000122><DIV
123CLASS="REFNAMEDIV"
124><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000125NAME="AEN22450"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000126></A
127><H2
128>Name</H2
Daniel Veillard503b8932001-01-05 06:36:31 +0000129>encoding&nbsp;--&nbsp;</DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000130><DIV
131CLASS="REFSYNOPSISDIV"
132><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000133NAME="AEN22453"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000134></A
135><H2
136>Synopsis</H2
137><TABLE
138BORDER="0"
139BGCOLOR="#D6E8FF"
140WIDTH="100%"
141CELLPADDING="6"
142><TR
143><TD
144><PRE
145CLASS="SYNOPSIS"
146>&#13;
147
148enum <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000149HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000150>xmlCharEncoding</A
151>;
152int (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000153HREF="libxml-encoding.html#XMLCHARENCODINGINPUTFUNC"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000154>*xmlCharEncodingInputFunc</A
155>) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000156 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000157 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000158 int *inlen);
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000159int (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000160HREF="libxml-encoding.html#XMLCHARENCODINGOUTPUTFUNC"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000161>*xmlCharEncodingOutputFunc</A
162>) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000163 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000164 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000165 int *inlen);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000166struct <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000167HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000168>xmlCharEncodingHandler</A
169>;
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000170typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000171HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000172>xmlCharEncodingHandlerPtr</A
173>;
174void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000175HREF="libxml-encoding.html#XMLINITCHARENCODINGHANDLERS"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000176>xmlInitCharEncodingHandlers</A
177> (void);
178void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000179HREF="libxml-encoding.html#XMLCLEANUPCHARENCODINGHANDLERS"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000180>xmlCleanupCharEncodingHandlers</A
181> (void);
182void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000183HREF="libxml-encoding.html#XMLREGISTERCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000184>xmlRegisterCharEncodingHandler</A
185> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000186HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000187>xmlCharEncodingHandlerPtr</A
188> handler);
189<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000190HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000191>xmlCharEncodingHandlerPtr</A
192> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000193HREF="libxml-encoding.html#XMLGETCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000194>xmlGetCharEncodingHandler</A
195>
196 (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000197HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000198>xmlCharEncoding</A
199> enc);
200<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000201HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000202>xmlCharEncodingHandlerPtr</A
203> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000204HREF="libxml-encoding.html#XMLFINDCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000205>xmlFindCharEncodingHandler</A
206>
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000207 (const char *name);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000208int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000209HREF="libxml-encoding.html#XMLADDENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000210>xmlAddEncodingAlias</A
211> (const char *name,
212 const char *alias);
213int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000214HREF="libxml-encoding.html#XMLDELENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000215>xmlDelEncodingAlias</A
216> (const char *alias);
217const char* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000218HREF="libxml-encoding.html#XMLGETENCODINGALIAS"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000219>xmlGetEncodingAlias</A
220> (const char *alias);
221void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000222HREF="libxml-encoding.html#XMLCLEANUPENCODINGALIASES"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000223>xmlCleanupEncodingAliases</A
224> (void);
225<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000226HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000227>xmlCharEncoding</A
228> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000229HREF="libxml-encoding.html#XMLPARSECHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000230>xmlParseCharEncoding</A
231> (const char *name);
232const char* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000233HREF="libxml-encoding.html#XMLGETCHARENCODINGNAME"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000234>xmlGetCharEncodingName</A
235> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000236HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000237>xmlCharEncoding</A
238> enc);
239<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000240HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000241>xmlCharEncoding</A
242> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000243HREF="libxml-encoding.html#XMLDETECTCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000244>xmlDetectCharEncoding</A
245> (unsigned char *in,
246 int len);
247int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000248HREF="libxml-encoding.html#XMLCHARENCOUTFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000249>xmlCharEncOutFunc</A
250> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000251HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000252>xmlCharEncodingHandler</A
253> *handler,
254 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000255HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000256>xmlBufferPtr</A
257> out,
258 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000259HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000260>xmlBufferPtr</A
261> in);
262int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000263HREF="libxml-encoding.html#XMLCHARENCINFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000264>xmlCharEncInFunc</A
265> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000266HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000267>xmlCharEncodingHandler</A
268> *handler,
269 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000270HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000271>xmlBufferPtr</A
272> out,
273 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000274HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000275>xmlBufferPtr</A
276> in);
277int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000278HREF="libxml-encoding.html#XMLCHARENCFIRSTLINE"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000279>xmlCharEncFirstLine</A
280> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000281HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000282>xmlCharEncodingHandler</A
283> *handler,
284 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000285HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000286>xmlBufferPtr</A
287> out,
288 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000289HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000290>xmlBufferPtr</A
291> in);
292int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000293HREF="libxml-encoding.html#XMLCHARENCCLOSEFUNC"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000294>xmlCharEncCloseFunc</A
295> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000296HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000297>xmlCharEncodingHandler</A
Daniel Veillarda41123c2001-04-22 19:31:20 +0000298> *handler);
299int <A
300HREF="libxml-encoding.html#UTF8TOISOLAT1"
301>UTF8Toisolat1</A
302> (unsigned char *out,
303 int *outlen,
304 unsigned char *in,
305 int *inlen);
306int <A
307HREF="libxml-encoding.html#ISOLAT1TOUTF8"
308>isolat1ToUTF8</A
309> (unsigned char *out,
310 int *outlen,
311 unsigned char *in,
312 int *inlen);
313int <A
314HREF="libxml-encoding.html#XMLCHECKUTF8"
315>xmlCheckUTF8</A
316> (unsigned char *utf);
317int <A
Daniel Veillard4ec885a2001-06-17 10:31:07 +0000318HREF="libxml-encoding.html#XMLUTF8STRSIZE"
319>xmlUTF8Strsize</A
320> (const <A
321HREF="libxml-tree.html#XMLCHAR"
322>xmlChar</A
323> *utf,
324 int len);
325<A
326HREF="libxml-tree.html#XMLCHAR"
327>xmlChar</A
328>* <A
329HREF="libxml-encoding.html#XMLUTF8STRNDUP"
330>xmlUTF8Strndup</A
331> (const <A
332HREF="libxml-tree.html#XMLCHAR"
333>xmlChar</A
334> *utf,
335 int len);
336<A
337HREF="libxml-tree.html#XMLCHAR"
338>xmlChar</A
339>* <A
340HREF="libxml-encoding.html#XMLUTF8STRPOS"
341>xmlUTF8Strpos</A
342> (const <A
343HREF="libxml-tree.html#XMLCHAR"
344>xmlChar</A
345> *utf,
346 int pos);
347int <A
348HREF="libxml-encoding.html#XMLUTF8STRLOC"
349>xmlUTF8Strloc</A
350> (const <A
351HREF="libxml-tree.html#XMLCHAR"
352>xmlChar</A
353> *utf,
354 const <A
355HREF="libxml-tree.html#XMLCHAR"
356>xmlChar</A
357> *utfchar);
358<A
359HREF="libxml-tree.html#XMLCHAR"
360>xmlChar</A
361>* <A
362HREF="libxml-encoding.html#XMLUTF8STRSUB"
363>xmlUTF8Strsub</A
364> (const <A
365HREF="libxml-tree.html#XMLCHAR"
366>xmlChar</A
367> *utf,
368 int start,
369 int len);
370int <A
Daniel Veillarda41123c2001-04-22 19:31:20 +0000371HREF="libxml-encoding.html#XMLUTF8STRLEN"
372>xmlUTF8Strlen</A
Daniel Veillard4ec885a2001-06-17 10:31:07 +0000373> (const <A
374HREF="libxml-tree.html#XMLCHAR"
375>xmlChar</A
376> *utf);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000377></TD
378></TR
379></TABLE
380></DIV
381><DIV
382CLASS="REFSECT1"
383><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000384NAME="AEN22513"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000385></A
386><H2
387>Description</H2
388><P
389></P
390></DIV
391><DIV
392CLASS="REFSECT1"
393><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000394NAME="AEN22516"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000395></A
396><H2
397>Details</H2
398><DIV
399CLASS="REFSECT2"
400><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000401NAME="AEN22518"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000402></A
403><H3
404><A
405NAME="XMLCHARENCODING"
406></A
407>enum xmlCharEncoding</H3
408><TABLE
409BORDER="0"
410BGCOLOR="#D6E8FF"
411WIDTH="100%"
412CELLPADDING="6"
413><TR
414><TD
415><PRE
416CLASS="PROGRAMLISTING"
417>typedef enum {
418 XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
419 XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
420 XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
421 XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
422 XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
423 XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
424 XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
425 XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
426 XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
427 XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
428 XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
429 XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
430 XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
431 XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
432 XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
433 XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
434 XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
435 XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
436 XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
437 XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
438 XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
439 XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
Daniel Veillarde46e20d2000-07-14 15:02:46 +0000440 XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
441 XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000442} xmlCharEncoding;</PRE
443></TD
444></TR
445></TABLE
446><P
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000447>Predefined values for some standard encodings
448Libxml don't do beforehand translation on UTF8, ISOLatinX
449It also support UTF16 (LE and BE) by default.</P
450><P
451>Anything else would have to be translated to UTF8 before being
452given to the parser itself. The BOM for UTF16 and the encoding
453declaration are looked at and a converter is looked for at that
454point. If not found the parser stops here as asked by the XML REC
455Converter can be registered by the user using xmlRegisterCharEncodingHandler
456but the currentl form doesn't allow stateful transcoding (a serious
457problem agreed !). If iconv has been found it will be used
458automatically and allow stateful transcoding, the simplest is then
459to be sure to enable icon and to provide iconv libs for the encoding
460support needed.</P
461><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000462></P
463></DIV
464><HR><DIV
465CLASS="REFSECT2"
466><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000467NAME="AEN22525"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000468></A
469><H3
470><A
471NAME="XMLCHARENCODINGINPUTFUNC"
472></A
473>xmlCharEncodingInputFunc ()</H3
474><TABLE
475BORDER="0"
476BGCOLOR="#D6E8FF"
477WIDTH="100%"
478CELLPADDING="6"
479><TR
480><TD
481><PRE
482CLASS="PROGRAMLISTING"
483>int (*xmlCharEncodingInputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000484 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000485 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000486 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000487></TD
488></TR
489></TABLE
490><P
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000491>Take a block of chars in the original encoding and try to convert
492it to an UTF-8 block of chars out.</P
493><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000494></P
495><DIV
496CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000497><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000498NAME="AEN22531"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000499></A
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000500><P
501></P
502><TABLE
503BORDER="0"
504WIDTH="100%"
505BGCOLOR="#FFD0D0"
506CELLSPACING="0"
507CELLPADDING="4"
508CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000509><TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000510><TR
511><TD
512WIDTH="20%"
513ALIGN="RIGHT"
514VALIGN="TOP"
515><TT
516CLASS="PARAMETER"
517><I
518>out</I
519></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000520>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000521><TD
522WIDTH="80%"
523ALIGN="LEFT"
524VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000525> a pointer ot an array of bytes to store the UTF-8 result</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000526></TR
527><TR
528><TD
529WIDTH="20%"
530ALIGN="RIGHT"
531VALIGN="TOP"
532><TT
533CLASS="PARAMETER"
534><I
535>outlen</I
536></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000537>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000538><TD
539WIDTH="80%"
540ALIGN="LEFT"
541VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000542> the lenght of <TT
543CLASS="PARAMETER"
544><I
545>out</I
546></TT
547></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000548></TR
549><TR
550><TD
551WIDTH="20%"
552ALIGN="RIGHT"
553VALIGN="TOP"
554><TT
555CLASS="PARAMETER"
556><I
557>in</I
558></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000559>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000560><TD
561WIDTH="80%"
562ALIGN="LEFT"
563VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000564> a pointer ot an array of chars in the original encoding</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000565></TR
566><TR
567><TD
568WIDTH="20%"
569ALIGN="RIGHT"
570VALIGN="TOP"
571><TT
572CLASS="PARAMETER"
573><I
574>inlen</I
575></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000576>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000577><TD
578WIDTH="80%"
579ALIGN="LEFT"
580VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000581> the lenght of <TT
582CLASS="PARAMETER"
583><I
584>in</I
585></TT
586></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000587></TR
588><TR
589><TD
590WIDTH="20%"
591ALIGN="RIGHT"
592VALIGN="TOP"
593><I
594CLASS="EMPHASIS"
595>Returns</I
596> :</TD
597><TD
598WIDTH="80%"
599ALIGN="LEFT"
600VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000601>the number of byte written, or -1 by lack of space, or -2
602if the transcoding failed.
603The value of <TT
604CLASS="PARAMETER"
605><I
606>inlen</I
607></TT
608> after return is the number of octets consumed
609as the return value is positive, else unpredictiable.
610The value of <TT
611CLASS="PARAMETER"
612><I
613>outlen</I
614></TT
615> after return is the number of ocetes consumed.</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000616></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000617></TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000618></TABLE
619><P
620></P
621></DIV
622></DIV
623><HR><DIV
624CLASS="REFSECT2"
625><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000626NAME="AEN22560"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000627></A
628><H3
629><A
630NAME="XMLCHARENCODINGOUTPUTFUNC"
631></A
632>xmlCharEncodingOutputFunc ()</H3
633><TABLE
634BORDER="0"
635BGCOLOR="#D6E8FF"
636WIDTH="100%"
637CELLPADDING="6"
638><TR
639><TD
640><PRE
641CLASS="PROGRAMLISTING"
642>int (*xmlCharEncodingOutputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000643 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000644 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000645 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000646></TD
647></TR
648></TABLE
649><P
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000650>Take a block of UTF-8 chars in and try to convert it to an other
651encoding.
652Note: a first call designed to produce heading info is called with
653in = NULL. If stateful this should also initialize the encoder state</P
654><P
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000655></P
656><DIV
657CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000658><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000659NAME="AEN22566"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000660></A
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000661><P
662></P
663><TABLE
664BORDER="0"
665WIDTH="100%"
666BGCOLOR="#FFD0D0"
667CELLSPACING="0"
668CELLPADDING="4"
669CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000670><TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000671><TR
672><TD
673WIDTH="20%"
674ALIGN="RIGHT"
675VALIGN="TOP"
676><TT
677CLASS="PARAMETER"
678><I
679>out</I
680></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000681>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000682><TD
683WIDTH="80%"
684ALIGN="LEFT"
685VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000686> a pointer ot an array of bytes to store the result</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000687></TR
688><TR
689><TD
690WIDTH="20%"
691ALIGN="RIGHT"
692VALIGN="TOP"
693><TT
694CLASS="PARAMETER"
695><I
696>outlen</I
697></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000698>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000699><TD
700WIDTH="80%"
701ALIGN="LEFT"
702VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000703> the lenght of <TT
704CLASS="PARAMETER"
705><I
706>out</I
707></TT
708></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000709></TR
710><TR
711><TD
712WIDTH="20%"
713ALIGN="RIGHT"
714VALIGN="TOP"
715><TT
716CLASS="PARAMETER"
717><I
718>in</I
719></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000720>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000721><TD
722WIDTH="80%"
723ALIGN="LEFT"
724VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000725> a pointer ot an array of UTF-8 chars</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000726></TR
727><TR
728><TD
729WIDTH="20%"
730ALIGN="RIGHT"
731VALIGN="TOP"
732><TT
733CLASS="PARAMETER"
734><I
735>inlen</I
736></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000737>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000738><TD
739WIDTH="80%"
740ALIGN="LEFT"
741VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000742> the lenght of <TT
743CLASS="PARAMETER"
744><I
745>in</I
746></TT
747></TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000748></TR
749><TR
750><TD
751WIDTH="20%"
752ALIGN="RIGHT"
753VALIGN="TOP"
754><I
755CLASS="EMPHASIS"
756>Returns</I
757> :</TD
758><TD
759WIDTH="80%"
760ALIGN="LEFT"
761VALIGN="TOP"
Daniel Veillarde7ead2d2001-08-22 23:44:09 +0000762>the number of byte written, or -1 by lack of space, or -2
763if the transcoding failed.
764The value of <TT
765CLASS="PARAMETER"
766><I
767>inlen</I
768></TT
769> after return is the number of octets consumed
770as the return value is positive, else unpredictiable.
771The value of <TT
772CLASS="PARAMETER"
773><I
774>outlen</I
775></TT
776> after return is the number of ocetes consumed.</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000777></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000778></TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000779></TABLE
780><P
781></P
782></DIV
783></DIV
784><HR><DIV
785CLASS="REFSECT2"
786><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000787NAME="AEN22595"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000788></A
789><H3
790><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000791NAME="XMLCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000792></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000793>struct xmlCharEncodingHandler</H3
794><TABLE
795BORDER="0"
796BGCOLOR="#D6E8FF"
797WIDTH="100%"
798CELLPADDING="6"
799><TR
800><TD
801><PRE
802CLASS="PROGRAMLISTING"
803>struct xmlCharEncodingHandler {
804 char *name;
805 xmlCharEncodingInputFunc input;
806 xmlCharEncodingOutputFunc output;
807#ifdef LIBXML_ICONV_ENABLED
808 iconv_t iconv_in;
809 iconv_t iconv_out;
810#endif /* LIBXML_ICONV_ENABLED */
811};</PRE
812></TD
813></TR
814></TABLE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000815><P
816></P
817></DIV
818><HR><DIV
819CLASS="REFSECT2"
820><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000821NAME="AEN22600"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000822></A
823><H3
824><A
825NAME="XMLCHARENCODINGHANDLERPTR"
826></A
827>xmlCharEncodingHandlerPtr</H3
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000828><TABLE
829BORDER="0"
830BGCOLOR="#D6E8FF"
831WIDTH="100%"
832CELLPADDING="6"
833><TR
834><TD
835><PRE
836CLASS="PROGRAMLISTING"
837>typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;</PRE
838></TD
839></TR
840></TABLE
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000841><P
842></P
843></DIV
844><HR><DIV
845CLASS="REFSECT2"
846><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000847NAME="AEN22605"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000848></A
849><H3
850><A
851NAME="XMLINITCHARENCODINGHANDLERS"
852></A
853>xmlInitCharEncodingHandlers ()</H3
854><TABLE
855BORDER="0"
856BGCOLOR="#D6E8FF"
857WIDTH="100%"
858CELLPADDING="6"
859><TR
860><TD
861><PRE
862CLASS="PROGRAMLISTING"
863>void xmlInitCharEncodingHandlers (void);</PRE
864></TD
865></TR
866></TABLE
867><P
868>Initialize the char encoding support, it registers the default
869encoding supported.
870NOTE: while public, this function usually doesn't need to be called
871in normal processing.</P
872><P
873></P
874></DIV
875><HR><DIV
876CLASS="REFSECT2"
877><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000878NAME="AEN22611"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000879></A
880><H3
881><A
882NAME="XMLCLEANUPCHARENCODINGHANDLERS"
883></A
884>xmlCleanupCharEncodingHandlers ()</H3
885><TABLE
886BORDER="0"
887BGCOLOR="#D6E8FF"
888WIDTH="100%"
889CELLPADDING="6"
890><TR
891><TD
892><PRE
893CLASS="PROGRAMLISTING"
894>void xmlCleanupCharEncodingHandlers (void);</PRE
895></TD
896></TR
897></TABLE
898><P
899>Cleanup the memory allocated for the char encoding support, it
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000900unregisters all the encoding handlers and the aliases.</P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000901><P
902></P
903></DIV
904><HR><DIV
905CLASS="REFSECT2"
906><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000907NAME="AEN22617"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000908></A
909><H3
910><A
911NAME="XMLREGISTERCHARENCODINGHANDLER"
912></A
913>xmlRegisterCharEncodingHandler ()</H3
914><TABLE
915BORDER="0"
916BGCOLOR="#D6E8FF"
917WIDTH="100%"
918CELLPADDING="6"
919><TR
920><TD
921><PRE
922CLASS="PROGRAMLISTING"
923>void xmlRegisterCharEncodingHandler (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000924HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000925>xmlCharEncodingHandlerPtr</A
926> handler);</PRE
927></TD
928></TR
929></TABLE
930><P
931>Register the char encoding handler, surprizing, isn't it ?</P
932><P
933></P
934><DIV
935CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000936><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000937NAME="AEN22624"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000938></A
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000939><P
940></P
941><TABLE
942BORDER="0"
943WIDTH="100%"
944BGCOLOR="#FFD0D0"
945CELLSPACING="0"
946CELLPADDING="4"
947CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000948><TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000949><TR
950><TD
951WIDTH="20%"
952ALIGN="RIGHT"
953VALIGN="TOP"
954><TT
955CLASS="PARAMETER"
956><I
957>handler</I
958></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000959>&nbsp;:</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000960><TD
961WIDTH="80%"
962ALIGN="LEFT"
963VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +0000964> the xmlCharEncodingHandlerPtr handler block</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000965></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000966></TBODY
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000967></TABLE
968><P
969></P
970></DIV
971></DIV
972><HR><DIV
973CLASS="REFSECT2"
974><A
Daniel Veillard04382ae2001-09-12 18:51:30 +0000975NAME="AEN22633"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000976></A
977><H3
978><A
979NAME="XMLGETCHARENCODINGHANDLER"
980></A
981>xmlGetCharEncodingHandler ()</H3
982><TABLE
983BORDER="0"
984BGCOLOR="#D6E8FF"
985WIDTH="100%"
986CELLPADDING="6"
987><TR
988><TD
989><PRE
990CLASS="PROGRAMLISTING"
991><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000992HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000993>xmlCharEncodingHandlerPtr</A
994> xmlGetCharEncodingHandler
995 (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000996HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000997>xmlCharEncoding</A
998> enc);</PRE
999></TD
1000></TR
1001></TABLE
1002><P
1003>Search in the registrered set the handler able to read/write that encoding.</P
1004><P
1005></P
1006><DIV
1007CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001008><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001009NAME="AEN22641"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001010></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001011><P
1012></P
1013><TABLE
1014BORDER="0"
1015WIDTH="100%"
1016BGCOLOR="#FFD0D0"
1017CELLSPACING="0"
1018CELLPADDING="4"
1019CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001020><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001021><TR
1022><TD
1023WIDTH="20%"
1024ALIGN="RIGHT"
1025VALIGN="TOP"
1026><TT
1027CLASS="PARAMETER"
1028><I
1029>enc</I
1030></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001031>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001032><TD
1033WIDTH="80%"
1034ALIGN="LEFT"
1035VALIGN="TOP"
Daniel Veillardf012a642001-07-23 19:10:52 +00001036> an xmlCharEncoding value.</TD
1037></TR
1038><TR
1039><TD
1040WIDTH="20%"
1041ALIGN="RIGHT"
1042VALIGN="TOP"
1043><I
1044CLASS="EMPHASIS"
1045>Returns</I
1046> :</TD
1047><TD
1048WIDTH="80%"
1049ALIGN="LEFT"
1050VALIGN="TOP"
1051>the handler or NULL if not found</TD
1052></TR
1053></TBODY
1054></TABLE
1055><P
1056></P
1057></DIV
1058></DIV
1059><HR><DIV
1060CLASS="REFSECT2"
1061><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001062NAME="AEN22654"
Daniel Veillardf012a642001-07-23 19:10:52 +00001063></A
1064><H3
1065><A
1066NAME="XMLFINDCHARENCODINGHANDLER"
1067></A
1068>xmlFindCharEncodingHandler ()</H3
1069><TABLE
1070BORDER="0"
1071BGCOLOR="#D6E8FF"
1072WIDTH="100%"
1073CELLPADDING="6"
1074><TR
1075><TD
1076><PRE
1077CLASS="PROGRAMLISTING"
1078><A
1079HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
1080>xmlCharEncodingHandlerPtr</A
1081> xmlFindCharEncodingHandler
1082 (const char *name);</PRE
1083></TD
1084></TR
1085></TABLE
1086><P
1087>Search in the registrered set the handler able to read/write that encoding.</P
1088><P
1089></P
1090><DIV
1091CLASS="INFORMALTABLE"
1092><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001093NAME="AEN22661"
Daniel Veillardf012a642001-07-23 19:10:52 +00001094></A
1095><P
1096></P
1097><TABLE
1098BORDER="0"
1099WIDTH="100%"
1100BGCOLOR="#FFD0D0"
1101CELLSPACING="0"
1102CELLPADDING="4"
1103CLASS="CALSTABLE"
1104><TBODY
1105><TR
1106><TD
1107WIDTH="20%"
1108ALIGN="RIGHT"
1109VALIGN="TOP"
1110><TT
1111CLASS="PARAMETER"
1112><I
1113>name</I
1114></TT
1115>&nbsp;:</TD
1116><TD
1117WIDTH="80%"
1118ALIGN="LEFT"
1119VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001120> a string describing the char encoding.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001121></TR
1122><TR
1123><TD
1124WIDTH="20%"
1125ALIGN="RIGHT"
1126VALIGN="TOP"
1127><I
1128CLASS="EMPHASIS"
1129>Returns</I
1130> :</TD
1131><TD
1132WIDTH="80%"
1133ALIGN="LEFT"
1134VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001135>the handler or NULL if not found</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001136></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001137></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001138></TABLE
1139><P
1140></P
1141></DIV
1142></DIV
1143><HR><DIV
1144CLASS="REFSECT2"
1145><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001146NAME="AEN22674"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001147></A
1148><H3
1149><A
1150NAME="XMLADDENCODINGALIAS"
1151></A
1152>xmlAddEncodingAlias ()</H3
1153><TABLE
1154BORDER="0"
1155BGCOLOR="#D6E8FF"
1156WIDTH="100%"
1157CELLPADDING="6"
1158><TR
1159><TD
1160><PRE
1161CLASS="PROGRAMLISTING"
1162>int xmlAddEncodingAlias (const char *name,
1163 const char *alias);</PRE
1164></TD
1165></TR
1166></TABLE
1167><P
1168>Registers and alias <TT
1169CLASS="PARAMETER"
1170><I
1171>alias</I
1172></TT
1173> for an encoding named <TT
1174CLASS="PARAMETER"
1175><I
1176>name</I
1177></TT
1178>. Existing alias
1179will be overwritten.</P
1180><P
1181></P
1182><DIV
1183CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001184><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001185NAME="AEN22682"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001186></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001187><P
1188></P
1189><TABLE
1190BORDER="0"
1191WIDTH="100%"
1192BGCOLOR="#FFD0D0"
1193CELLSPACING="0"
1194CELLPADDING="4"
1195CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001196><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001197><TR
1198><TD
1199WIDTH="20%"
1200ALIGN="RIGHT"
1201VALIGN="TOP"
1202><TT
1203CLASS="PARAMETER"
1204><I
1205>name</I
1206></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001207>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001208><TD
1209WIDTH="80%"
1210ALIGN="LEFT"
1211VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001212> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001213></TR
1214><TR
1215><TD
1216WIDTH="20%"
1217ALIGN="RIGHT"
1218VALIGN="TOP"
1219><TT
1220CLASS="PARAMETER"
1221><I
1222>alias</I
1223></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001224>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001225><TD
1226WIDTH="80%"
1227ALIGN="LEFT"
1228VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001229> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001230></TR
1231><TR
1232><TD
1233WIDTH="20%"
1234ALIGN="RIGHT"
1235VALIGN="TOP"
1236><I
1237CLASS="EMPHASIS"
1238>Returns</I
1239> :</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 Veillard04382ae2001-09-12 18:51:30 +00001255NAME="AEN22699"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001256></A
1257><H3
1258><A
1259NAME="XMLDELENCODINGALIAS"
1260></A
1261>xmlDelEncodingAlias ()</H3
1262><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 Veillard04382ae2001-09-12 18:51:30 +00001287NAME="AEN22706"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001288></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001289><P
1290></P
1291><TABLE
1292BORDER="0"
1293WIDTH="100%"
1294BGCOLOR="#FFD0D0"
1295CELLSPACING="0"
1296CELLPADDING="4"
1297CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001298><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001299><TR
1300><TD
1301WIDTH="20%"
1302ALIGN="RIGHT"
1303VALIGN="TOP"
1304><TT
1305CLASS="PARAMETER"
1306><I
1307>alias</I
1308></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001309>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001310><TD
1311WIDTH="80%"
1312ALIGN="LEFT"
1313VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001314> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001315></TR
1316><TR
1317><TD
1318WIDTH="20%"
1319ALIGN="RIGHT"
1320VALIGN="TOP"
1321><I
1322CLASS="EMPHASIS"
1323>Returns</I
1324> :</TD
1325><TD
1326WIDTH="80%"
1327ALIGN="LEFT"
1328VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001329>0 in case of success, -1 in case of error</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001330></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001331></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001332></TABLE
1333><P
1334></P
1335></DIV
1336></DIV
1337><HR><DIV
1338CLASS="REFSECT2"
1339><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001340NAME="AEN22719"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001341></A
1342><H3
1343><A
1344NAME="XMLGETENCODINGALIAS"
1345></A
1346>xmlGetEncodingAlias ()</H3
1347><TABLE
1348BORDER="0"
1349BGCOLOR="#D6E8FF"
1350WIDTH="100%"
1351CELLPADDING="6"
1352><TR
1353><TD
1354><PRE
1355CLASS="PROGRAMLISTING"
1356>const char* xmlGetEncodingAlias (const char *alias);</PRE
1357></TD
1358></TR
1359></TABLE
1360><P
1361>Lookup an encoding name for the given alias.</P
1362><P
1363></P
1364><DIV
1365CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001366><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001367NAME="AEN22725"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001368></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001369><P
1370></P
1371><TABLE
1372BORDER="0"
1373WIDTH="100%"
1374BGCOLOR="#FFD0D0"
1375CELLSPACING="0"
1376CELLPADDING="4"
1377CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001378><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001379><TR
1380><TD
1381WIDTH="20%"
1382ALIGN="RIGHT"
1383VALIGN="TOP"
1384><TT
1385CLASS="PARAMETER"
1386><I
1387>alias</I
1388></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001389>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001390><TD
1391WIDTH="80%"
1392ALIGN="LEFT"
1393VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001394> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001395></TR
1396><TR
1397><TD
1398WIDTH="20%"
1399ALIGN="RIGHT"
1400VALIGN="TOP"
1401><I
1402CLASS="EMPHASIS"
1403>Returns</I
1404> :</TD
1405><TD
1406WIDTH="80%"
1407ALIGN="LEFT"
1408VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001409>NULL if not found the original name otherwise</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001410></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001411></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001412></TABLE
1413><P
1414></P
1415></DIV
1416></DIV
1417><HR><DIV
1418CLASS="REFSECT2"
1419><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001420NAME="AEN22738"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001421></A
1422><H3
1423><A
1424NAME="XMLCLEANUPENCODINGALIASES"
1425></A
1426>xmlCleanupEncodingAliases ()</H3
1427><TABLE
1428BORDER="0"
1429BGCOLOR="#D6E8FF"
1430WIDTH="100%"
1431CELLPADDING="6"
1432><TR
1433><TD
1434><PRE
1435CLASS="PROGRAMLISTING"
1436>void xmlCleanupEncodingAliases (void);</PRE
1437></TD
1438></TR
1439></TABLE
1440><P
1441>Unregisters all aliases</P
1442><P
1443></P
1444></DIV
1445><HR><DIV
1446CLASS="REFSECT2"
1447><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001448NAME="AEN22744"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001449></A
1450><H3
1451><A
1452NAME="XMLPARSECHARENCODING"
1453></A
1454>xmlParseCharEncoding ()</H3
1455><TABLE
1456BORDER="0"
1457BGCOLOR="#D6E8FF"
1458WIDTH="100%"
1459CELLPADDING="6"
1460><TR
1461><TD
1462><PRE
1463CLASS="PROGRAMLISTING"
1464><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001465HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001466>xmlCharEncoding</A
1467> xmlParseCharEncoding (const char *name);</PRE
1468></TD
1469></TR
1470></TABLE
1471><P
1472>Conpare the string to the known encoding schemes already known. Note
1473that the comparison is case insensitive accordingly to the section
1474[XML] 4.3.3 Character Encoding in Entities.</P
1475><P
1476></P
1477><DIV
1478CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001479><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001480NAME="AEN22751"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001481></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001482><P
1483></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"
1514><I
1515CLASS="EMPHASIS"
1516>Returns</I
1517> :</TD
1518><TD
1519WIDTH="80%"
1520ALIGN="LEFT"
1521VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001522>one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE
1523if not recognized.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001524></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001525></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001526></TABLE
1527><P
1528></P
1529></DIV
1530></DIV
1531><HR><DIV
1532CLASS="REFSECT2"
1533><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001534NAME="AEN22764"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001535></A
1536><H3
1537><A
1538NAME="XMLGETCHARENCODINGNAME"
1539></A
1540>xmlGetCharEncodingName ()</H3
1541><TABLE
1542BORDER="0"
1543BGCOLOR="#D6E8FF"
1544WIDTH="100%"
1545CELLPADDING="6"
1546><TR
1547><TD
1548><PRE
1549CLASS="PROGRAMLISTING"
1550>const char* xmlGetCharEncodingName (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001551HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001552>xmlCharEncoding</A
1553> enc);</PRE
1554></TD
1555></TR
1556></TABLE
1557><P
1558>The "canonical" name for XML encoding.
1559C.f. http://www.w3.org/TR/REC-xml<GTKDOCLINK
1560HREF="CHARENCODING"
1561>charencoding</GTKDOCLINK
1562>
1563Section 4.3.3 Character Encoding in Entities</P
1564><P
1565></P
1566><DIV
1567CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001568><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001569NAME="AEN22772"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001570></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001571><P
1572></P
1573><TABLE
1574BORDER="0"
1575WIDTH="100%"
1576BGCOLOR="#FFD0D0"
1577CELLSPACING="0"
1578CELLPADDING="4"
1579CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001580><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001581><TR
1582><TD
1583WIDTH="20%"
1584ALIGN="RIGHT"
1585VALIGN="TOP"
1586><TT
1587CLASS="PARAMETER"
1588><I
1589>enc</I
1590></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001591>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001592><TD
1593WIDTH="80%"
1594ALIGN="LEFT"
1595VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001596> the encoding</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001597></TR
1598><TR
1599><TD
1600WIDTH="20%"
1601ALIGN="RIGHT"
1602VALIGN="TOP"
1603><I
1604CLASS="EMPHASIS"
1605>Returns</I
1606> :</TD
1607><TD
1608WIDTH="80%"
1609ALIGN="LEFT"
1610VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001611>the canonical name for the given encoding</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001612></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001613></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001614></TABLE
1615><P
1616></P
1617></DIV
1618></DIV
1619><HR><DIV
1620CLASS="REFSECT2"
1621><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001622NAME="AEN22785"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001623></A
1624><H3
1625><A
1626NAME="XMLDETECTCHARENCODING"
1627></A
1628>xmlDetectCharEncoding ()</H3
1629><TABLE
1630BORDER="0"
1631BGCOLOR="#D6E8FF"
1632WIDTH="100%"
1633CELLPADDING="6"
1634><TR
1635><TD
1636><PRE
1637CLASS="PROGRAMLISTING"
1638><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001639HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001640>xmlCharEncoding</A
1641> xmlDetectCharEncoding (unsigned char *in,
1642 int len);</PRE
1643></TD
1644></TR
1645></TABLE
1646><P
1647>Guess the encoding of the entity using the first bytes of the entity content
1648accordingly of the non-normative appendix F of the XML-1.0 recommendation.</P
1649><P
1650></P
1651><DIV
1652CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001653><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001654NAME="AEN22792"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001655></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001656><P
1657></P
1658><TABLE
1659BORDER="0"
1660WIDTH="100%"
1661BGCOLOR="#FFD0D0"
1662CELLSPACING="0"
1663CELLPADDING="4"
1664CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001665><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001666><TR
1667><TD
1668WIDTH="20%"
1669ALIGN="RIGHT"
1670VALIGN="TOP"
1671><TT
1672CLASS="PARAMETER"
1673><I
1674>in</I
1675></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001676>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001677><TD
1678WIDTH="80%"
1679ALIGN="LEFT"
1680VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001681> a pointer to the first bytes of the XML entity, must be at least
16824 bytes long.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001683></TR
1684><TR
1685><TD
1686WIDTH="20%"
1687ALIGN="RIGHT"
1688VALIGN="TOP"
1689><TT
1690CLASS="PARAMETER"
1691><I
1692>len</I
1693></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001694>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001695><TD
1696WIDTH="80%"
1697ALIGN="LEFT"
1698VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001699> pointer to the length of the buffer</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001700></TR
1701><TR
1702><TD
1703WIDTH="20%"
1704ALIGN="RIGHT"
1705VALIGN="TOP"
1706><I
1707CLASS="EMPHASIS"
1708>Returns</I
1709> :</TD
1710><TD
1711WIDTH="80%"
1712ALIGN="LEFT"
1713VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001714>one of the XML_CHAR_ENCODING_... values.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001715></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001716></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001717></TABLE
1718><P
1719></P
1720></DIV
1721></DIV
1722><HR><DIV
1723CLASS="REFSECT2"
1724><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001725NAME="AEN22809"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001726></A
1727><H3
1728><A
1729NAME="XMLCHARENCOUTFUNC"
1730></A
1731>xmlCharEncOutFunc ()</H3
1732><TABLE
1733BORDER="0"
1734BGCOLOR="#D6E8FF"
1735WIDTH="100%"
1736CELLPADDING="6"
1737><TR
1738><TD
1739><PRE
1740CLASS="PROGRAMLISTING"
1741>int xmlCharEncOutFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001742HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001743>xmlCharEncodingHandler</A
1744> *handler,
1745 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001746HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001747>xmlBufferPtr</A
1748> out,
1749 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001750HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001751>xmlBufferPtr</A
1752> in);</PRE
1753></TD
1754></TR
1755></TABLE
1756><P
1757>Generic front-end for the encoding handler output function
1758a first call with <TT
1759CLASS="PARAMETER"
1760><I
1761>in</I
1762></TT
1763> == NULL has to be made firs to initiate the
1764output in case of non-stateless encoding needing to initiate their
1765state or the output (like the BOM in UTF16).
1766In case of UTF8 sequence conversion errors for the given encoder,
1767the content will be automatically remapped to a CharRef sequence.</P
1768><P
1769></P
1770><DIV
1771CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001772><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001773NAME="AEN22819"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001774></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001775><P
1776></P
1777><TABLE
1778BORDER="0"
1779WIDTH="100%"
1780BGCOLOR="#FFD0D0"
1781CELLSPACING="0"
1782CELLPADDING="4"
1783CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001784><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001785><TR
1786><TD
1787WIDTH="20%"
1788ALIGN="RIGHT"
1789VALIGN="TOP"
1790><TT
1791CLASS="PARAMETER"
1792><I
1793>handler</I
1794></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001795>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001796><TD
1797WIDTH="80%"
1798ALIGN="LEFT"
1799VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001800> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001801></TR
1802><TR
1803><TD
1804WIDTH="20%"
1805ALIGN="RIGHT"
1806VALIGN="TOP"
1807><TT
1808CLASS="PARAMETER"
1809><I
1810>out</I
1811></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001812>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001813><TD
1814WIDTH="80%"
1815ALIGN="LEFT"
1816VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001817> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001818></TR
1819><TR
1820><TD
1821WIDTH="20%"
1822ALIGN="RIGHT"
1823VALIGN="TOP"
1824><TT
1825CLASS="PARAMETER"
1826><I
Daniel Veillard06047432000-04-24 11:33:38 +00001827>in</I
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001828></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001829>&nbsp;:</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001830><TD
1831WIDTH="80%"
1832ALIGN="LEFT"
1833VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001834> an xmlBuffer for the input</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001835></TR
1836><TR
1837><TD
1838WIDTH="20%"
1839ALIGN="RIGHT"
1840VALIGN="TOP"
1841><I
1842CLASS="EMPHASIS"
1843>Returns</I
1844> :</TD
1845><TD
1846WIDTH="80%"
1847ALIGN="LEFT"
1848VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001849>the number of byte written if success, or
1850-1 general error
1851-2 if the transcoding fails (for *in is not valid utf8 string or
1852the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001853></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001854></TBODY
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001855></TABLE
1856><P
1857></P
1858></DIV
1859></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00001860><HR><DIV
1861CLASS="REFSECT2"
1862><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001863NAME="AEN22840"
Daniel Veillard06047432000-04-24 11:33:38 +00001864></A
1865><H3
1866><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001867NAME="XMLCHARENCINFUNC"
Daniel Veillard06047432000-04-24 11:33:38 +00001868></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001869>xmlCharEncInFunc ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001870><TABLE
1871BORDER="0"
1872BGCOLOR="#D6E8FF"
1873WIDTH="100%"
1874CELLPADDING="6"
1875><TR
1876><TD
1877><PRE
1878CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001879>int xmlCharEncInFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001880HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001881>xmlCharEncodingHandler</A
1882> *handler,
1883 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001884HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001885>xmlBufferPtr</A
1886> out,
1887 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001888HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001889>xmlBufferPtr</A
1890> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001891></TD
1892></TR
1893></TABLE
1894><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001895>Generic front-end for the encoding handler input function</P
Daniel Veillard06047432000-04-24 11:33:38 +00001896><P
1897></P
1898><DIV
1899CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001900><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001901NAME="AEN22849"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001902></A
Daniel Veillard06047432000-04-24 11:33:38 +00001903><P
1904></P
1905><TABLE
1906BORDER="0"
1907WIDTH="100%"
1908BGCOLOR="#FFD0D0"
1909CELLSPACING="0"
1910CELLPADDING="4"
1911CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001912><TBODY
Daniel Veillard06047432000-04-24 11:33:38 +00001913><TR
1914><TD
1915WIDTH="20%"
1916ALIGN="RIGHT"
1917VALIGN="TOP"
1918><TT
1919CLASS="PARAMETER"
1920><I
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001921>handler</I
Daniel Veillard06047432000-04-24 11:33:38 +00001922></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001923>&nbsp;:</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001924><TD
1925WIDTH="80%"
1926ALIGN="LEFT"
1927VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001928> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001929></TR
1930><TR
1931><TD
1932WIDTH="20%"
1933ALIGN="RIGHT"
1934VALIGN="TOP"
1935><TT
1936CLASS="PARAMETER"
1937><I
1938>out</I
1939></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001940>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001941><TD
1942WIDTH="80%"
1943ALIGN="LEFT"
1944VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001945> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001946></TR
1947><TR
1948><TD
1949WIDTH="20%"
1950ALIGN="RIGHT"
1951VALIGN="TOP"
1952><TT
1953CLASS="PARAMETER"
1954><I
1955>in</I
1956></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001957>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001958><TD
1959WIDTH="80%"
1960ALIGN="LEFT"
1961VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001962> an xmlBuffer for the input</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001963></TR
1964><TR
1965><TD
1966WIDTH="20%"
1967ALIGN="RIGHT"
1968VALIGN="TOP"
1969><I
1970CLASS="EMPHASIS"
1971>Returns</I
1972> :</TD
1973><TD
1974WIDTH="80%"
1975ALIGN="LEFT"
1976VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001977>the number of byte written if success, or
1978-1 general error
1979-2 if the transcoding fails (for *in is not valid utf8 string or
1980the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001981></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001982></TBODY
Daniel Veillard06047432000-04-24 11:33:38 +00001983></TABLE
1984><P
1985></P
1986></DIV
1987></DIV
1988><HR><DIV
1989CLASS="REFSECT2"
1990><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00001991NAME="AEN22870"
Daniel Veillard06047432000-04-24 11:33:38 +00001992></A
1993><H3
1994><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001995NAME="XMLCHARENCFIRSTLINE"
Daniel Veillard06047432000-04-24 11:33:38 +00001996></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001997>xmlCharEncFirstLine ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001998><TABLE
1999BORDER="0"
2000BGCOLOR="#D6E8FF"
2001WIDTH="100%"
2002CELLPADDING="6"
2003><TR
2004><TD
2005><PRE
2006CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002007>int xmlCharEncFirstLine (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002008HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002009>xmlCharEncodingHandler</A
2010> *handler,
2011 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002012HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002013>xmlBufferPtr</A
2014> out,
2015 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002016HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002017>xmlBufferPtr</A
2018> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00002019></TD
2020></TR
2021></TABLE
2022><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002023>Front-end for the encoding handler input function, but handle only
2024the very first line, i.e. limit itself to 45 chars.</P
Daniel Veillard06047432000-04-24 11:33:38 +00002025><P
2026></P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002027><DIV
2028CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002029><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002030NAME="AEN22879"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002031></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002032><P
2033></P
2034><TABLE
2035BORDER="0"
2036WIDTH="100%"
2037BGCOLOR="#FFD0D0"
2038CELLSPACING="0"
2039CELLPADDING="4"
2040CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002041><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002042><TR
2043><TD
2044WIDTH="20%"
2045ALIGN="RIGHT"
2046VALIGN="TOP"
2047><TT
2048CLASS="PARAMETER"
2049><I
2050>handler</I
2051></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002052>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002053><TD
2054WIDTH="80%"
2055ALIGN="LEFT"
2056VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002057> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002058></TR
2059><TR
2060><TD
2061WIDTH="20%"
2062ALIGN="RIGHT"
2063VALIGN="TOP"
2064><TT
2065CLASS="PARAMETER"
2066><I
2067>out</I
2068></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002069>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002070><TD
2071WIDTH="80%"
2072ALIGN="LEFT"
2073VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002074> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002075></TR
2076><TR
2077><TD
2078WIDTH="20%"
2079ALIGN="RIGHT"
2080VALIGN="TOP"
2081><TT
2082CLASS="PARAMETER"
2083><I
2084>in</I
2085></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002086>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002087><TD
2088WIDTH="80%"
2089ALIGN="LEFT"
2090VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002091> an xmlBuffer for the input</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002092></TR
2093><TR
2094><TD
2095WIDTH="20%"
2096ALIGN="RIGHT"
2097VALIGN="TOP"
2098><I
2099CLASS="EMPHASIS"
2100>Returns</I
2101> :</TD
2102><TD
2103WIDTH="80%"
2104ALIGN="LEFT"
2105VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002106>the number of byte written if success, or
2107-1 general error
2108-2 if the transcoding fails (for *in is not valid utf8 string or
2109the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002110></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002111></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002112></TABLE
2113><P
2114></P
2115></DIV
2116></DIV
2117><HR><DIV
2118CLASS="REFSECT2"
2119><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002120NAME="AEN22900"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002121></A
2122><H3
2123><A
2124NAME="XMLCHARENCCLOSEFUNC"
2125></A
2126>xmlCharEncCloseFunc ()</H3
2127><TABLE
2128BORDER="0"
2129BGCOLOR="#D6E8FF"
2130WIDTH="100%"
2131CELLPADDING="6"
2132><TR
2133><TD
2134><PRE
2135CLASS="PROGRAMLISTING"
2136>int xmlCharEncCloseFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002137HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002138>xmlCharEncodingHandler</A
2139> *handler);</PRE
2140></TD
2141></TR
2142></TABLE
2143><P
2144>Generic front-end for hencoding handler close function</P
2145><P
2146></P
2147><DIV
2148CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002149><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002150NAME="AEN22907"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002151></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002152><P
2153></P
2154><TABLE
2155BORDER="0"
2156WIDTH="100%"
2157BGCOLOR="#FFD0D0"
2158CELLSPACING="0"
2159CELLPADDING="4"
2160CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002161><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002162><TR
2163><TD
2164WIDTH="20%"
2165ALIGN="RIGHT"
2166VALIGN="TOP"
2167><TT
2168CLASS="PARAMETER"
2169><I
2170>handler</I
2171></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002172>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002173><TD
2174WIDTH="80%"
2175ALIGN="LEFT"
2176VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002177> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002178></TR
2179><TR
2180><TD
2181WIDTH="20%"
2182ALIGN="RIGHT"
2183VALIGN="TOP"
2184><I
2185CLASS="EMPHASIS"
2186>Returns</I
2187> :</TD
2188><TD
2189WIDTH="80%"
2190ALIGN="LEFT"
2191VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002192>0 if success, or -1 in case of error</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002193></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002194></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002195></TABLE
2196><P
2197></P
2198></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00002199></DIV
Daniel Veillarda41123c2001-04-22 19:31:20 +00002200><HR><DIV
2201CLASS="REFSECT2"
2202><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002203NAME="AEN22920"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002204></A
2205><H3
2206><A
2207NAME="UTF8TOISOLAT1"
2208></A
2209>UTF8Toisolat1 ()</H3
2210><TABLE
2211BORDER="0"
2212BGCOLOR="#D6E8FF"
2213WIDTH="100%"
2214CELLPADDING="6"
2215><TR
2216><TD
2217><PRE
2218CLASS="PROGRAMLISTING"
2219>int UTF8Toisolat1 (unsigned char *out,
2220 int *outlen,
2221 unsigned char *in,
2222 int *inlen);</PRE
2223></TD
2224></TR
2225></TABLE
2226><P
2227>Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1
2228block of chars out.</P
2229><P
2230></P
2231><DIV
2232CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002233><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002234NAME="AEN22926"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002235></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00002236><P
2237></P
2238><TABLE
2239BORDER="0"
2240WIDTH="100%"
2241BGCOLOR="#FFD0D0"
2242CELLSPACING="0"
2243CELLPADDING="4"
2244CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002245><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002246><TR
2247><TD
2248WIDTH="20%"
2249ALIGN="RIGHT"
2250VALIGN="TOP"
2251><TT
2252CLASS="PARAMETER"
2253><I
2254>out</I
2255></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002256>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002257><TD
2258WIDTH="80%"
2259ALIGN="LEFT"
2260VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002261> a pointer to an array of bytes to store the result</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002262></TR
2263><TR
2264><TD
2265WIDTH="20%"
2266ALIGN="RIGHT"
2267VALIGN="TOP"
2268><TT
2269CLASS="PARAMETER"
2270><I
2271>outlen</I
2272></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002273>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002274><TD
2275WIDTH="80%"
2276ALIGN="LEFT"
2277VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002278> the length of <TT
2279CLASS="PARAMETER"
2280><I
2281>out</I
2282></TT
2283></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002284></TR
2285><TR
2286><TD
2287WIDTH="20%"
2288ALIGN="RIGHT"
2289VALIGN="TOP"
2290><TT
2291CLASS="PARAMETER"
2292><I
2293>in</I
2294></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002295>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002296><TD
2297WIDTH="80%"
2298ALIGN="LEFT"
2299VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002300> a pointer to an array of UTF-8 chars</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002301></TR
2302><TR
2303><TD
2304WIDTH="20%"
2305ALIGN="RIGHT"
2306VALIGN="TOP"
2307><TT
2308CLASS="PARAMETER"
2309><I
2310>inlen</I
2311></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002312>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002313><TD
2314WIDTH="80%"
2315ALIGN="LEFT"
2316VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002317> the length of <TT
2318CLASS="PARAMETER"
2319><I
2320>in</I
2321></TT
2322></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002323></TR
2324><TR
2325><TD
2326WIDTH="20%"
2327ALIGN="RIGHT"
2328VALIGN="TOP"
2329><I
2330CLASS="EMPHASIS"
2331>Returns</I
2332> :</TD
2333><TD
2334WIDTH="80%"
2335ALIGN="LEFT"
2336VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002337>0 if success, -2 if the transcoding fails, or -1 otherwise
2338The value of <TT
2339CLASS="PARAMETER"
2340><I
2341>inlen</I
2342></TT
2343> after return is the number of octets consumed
2344as the return value is positive, else unpredictiable.
2345The value of <TT
2346CLASS="PARAMETER"
2347><I
2348>outlen</I
2349></TT
2350> after return is the number of ocetes consumed.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002351></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002352></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002353></TABLE
2354><P
2355></P
2356></DIV
2357></DIV
2358><HR><DIV
2359CLASS="REFSECT2"
2360><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002361NAME="AEN22955"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002362></A
2363><H3
2364><A
2365NAME="ISOLAT1TOUTF8"
2366></A
2367>isolat1ToUTF8 ()</H3
2368><TABLE
2369BORDER="0"
2370BGCOLOR="#D6E8FF"
2371WIDTH="100%"
2372CELLPADDING="6"
2373><TR
2374><TD
2375><PRE
2376CLASS="PROGRAMLISTING"
2377>int isolat1ToUTF8 (unsigned char *out,
2378 int *outlen,
2379 unsigned char *in,
2380 int *inlen);</PRE
2381></TD
2382></TR
2383></TABLE
2384><P
2385>Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8
2386block of chars out.</P
2387><P
2388></P
2389><DIV
2390CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002391><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002392NAME="AEN22961"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002393></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00002394><P
2395></P
2396><TABLE
2397BORDER="0"
2398WIDTH="100%"
2399BGCOLOR="#FFD0D0"
2400CELLSPACING="0"
2401CELLPADDING="4"
2402CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002403><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002404><TR
2405><TD
2406WIDTH="20%"
2407ALIGN="RIGHT"
2408VALIGN="TOP"
2409><TT
2410CLASS="PARAMETER"
2411><I
2412>out</I
2413></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002414>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002415><TD
2416WIDTH="80%"
2417ALIGN="LEFT"
2418VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002419> a pointer to an array of bytes to store the result</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002420></TR
2421><TR
2422><TD
2423WIDTH="20%"
2424ALIGN="RIGHT"
2425VALIGN="TOP"
2426><TT
2427CLASS="PARAMETER"
2428><I
2429>outlen</I
2430></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002431>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002432><TD
2433WIDTH="80%"
2434ALIGN="LEFT"
2435VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002436> the length of <TT
2437CLASS="PARAMETER"
2438><I
2439>out</I
2440></TT
2441></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002442></TR
2443><TR
2444><TD
2445WIDTH="20%"
2446ALIGN="RIGHT"
2447VALIGN="TOP"
2448><TT
2449CLASS="PARAMETER"
2450><I
2451>in</I
2452></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002453>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002454><TD
2455WIDTH="80%"
2456ALIGN="LEFT"
2457VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002458> a pointer to an array of ISO Latin 1 chars</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002459></TR
2460><TR
2461><TD
2462WIDTH="20%"
2463ALIGN="RIGHT"
2464VALIGN="TOP"
2465><TT
2466CLASS="PARAMETER"
2467><I
2468>inlen</I
2469></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002470>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002471><TD
2472WIDTH="80%"
2473ALIGN="LEFT"
2474VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002475> the length of <TT
2476CLASS="PARAMETER"
2477><I
2478>in</I
2479></TT
2480></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002481></TR
2482><TR
2483><TD
2484WIDTH="20%"
2485ALIGN="RIGHT"
2486VALIGN="TOP"
2487><I
2488CLASS="EMPHASIS"
2489>Returns</I
2490> :</TD
2491><TD
2492WIDTH="80%"
2493ALIGN="LEFT"
2494VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002495>0 if success, or -1 otherwise
2496The value of <TT
2497CLASS="PARAMETER"
2498><I
2499>inlen</I
2500></TT
2501> after return is the number of octets consumed
2502as the return value is positive, else unpredictiable.
2503The value of <TT
2504CLASS="PARAMETER"
2505><I
2506>outlen</I
2507></TT
2508> after return is the number of ocetes consumed.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002509></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002510></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002511></TABLE
2512><P
2513></P
2514></DIV
2515></DIV
2516><HR><DIV
2517CLASS="REFSECT2"
2518><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002519NAME="AEN22990"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002520></A
2521><H3
2522><A
2523NAME="XMLCHECKUTF8"
2524></A
2525>xmlCheckUTF8 ()</H3
2526><TABLE
2527BORDER="0"
2528BGCOLOR="#D6E8FF"
2529WIDTH="100%"
2530CELLPADDING="6"
2531><TR
2532><TD
2533><PRE
2534CLASS="PROGRAMLISTING"
2535>int xmlCheckUTF8 (unsigned char *utf);</PRE
2536></TD
2537></TR
2538></TABLE
2539><P
2540>Checks <TT
2541CLASS="PARAMETER"
2542><I
2543>utf</I
2544></TT
2545> for being valid utf-8. <TT
2546CLASS="PARAMETER"
2547><I
2548>utf</I
2549></TT
2550> is assumed to be
2551null-terminated. This function is not super-strict, as it will
2552allow longer utf-8 sequences than necessary. Note that Java is
2553capable of producing these sequences if provoked. Also note, this
2554routine checks for the 4-byte maxiumum size, but does not check for
25550x10ffff maximum value.</P
2556><P
2557></P
2558><DIV
2559CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002560><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002561NAME="AEN22998"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002562></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00002563><P
2564></P
2565><TABLE
2566BORDER="0"
2567WIDTH="100%"
2568BGCOLOR="#FFD0D0"
2569CELLSPACING="0"
2570CELLPADDING="4"
2571CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002572><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002573><TR
2574><TD
2575WIDTH="20%"
2576ALIGN="RIGHT"
2577VALIGN="TOP"
2578><TT
2579CLASS="PARAMETER"
2580><I
2581>utf</I
2582></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002583>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002584><TD
2585WIDTH="80%"
2586ALIGN="LEFT"
2587VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002588> Pointer to putative utf-8 encoded string.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002589></TR
2590><TR
2591><TD
2592WIDTH="20%"
2593ALIGN="RIGHT"
2594VALIGN="TOP"
2595><I
2596CLASS="EMPHASIS"
2597>Returns</I
2598> :</TD
2599><TD
2600WIDTH="80%"
2601ALIGN="LEFT"
2602VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002603> true if <TT
2604CLASS="PARAMETER"
2605><I
2606>utf</I
2607></TT
2608> is valid.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002609></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002610></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002611></TABLE
2612><P
2613></P
2614></DIV
2615></DIV
2616><HR><DIV
2617CLASS="REFSECT2"
2618><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002619NAME="AEN23012"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002620></A
2621><H3
2622><A
2623NAME="XMLUTF8STRSIZE"
2624></A
2625>xmlUTF8Strsize ()</H3
2626><TABLE
2627BORDER="0"
2628BGCOLOR="#D6E8FF"
2629WIDTH="100%"
2630CELLPADDING="6"
2631><TR
2632><TD
2633><PRE
2634CLASS="PROGRAMLISTING"
2635>int xmlUTF8Strsize (const <A
2636HREF="libxml-tree.html#XMLCHAR"
2637>xmlChar</A
2638> *utf,
2639 int len);</PRE
2640></TD
2641></TR
2642></TABLE
2643><P
2644>storage size of an UTF8 string</P
2645><P
2646></P
2647><DIV
2648CLASS="INFORMALTABLE"
2649><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002650NAME="AEN23019"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002651></A
2652><P
2653></P
2654><TABLE
2655BORDER="0"
2656WIDTH="100%"
2657BGCOLOR="#FFD0D0"
2658CELLSPACING="0"
2659CELLPADDING="4"
2660CLASS="CALSTABLE"
2661><TBODY
2662><TR
2663><TD
2664WIDTH="20%"
2665ALIGN="RIGHT"
2666VALIGN="TOP"
2667><TT
2668CLASS="PARAMETER"
2669><I
2670>utf</I
2671></TT
2672>&nbsp;:</TD
2673><TD
2674WIDTH="80%"
2675ALIGN="LEFT"
2676VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002677> a sequence of UTF-8 encoded bytes</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002678></TR
2679><TR
2680><TD
2681WIDTH="20%"
2682ALIGN="RIGHT"
2683VALIGN="TOP"
2684><TT
2685CLASS="PARAMETER"
2686><I
2687>len</I
2688></TT
2689>&nbsp;:</TD
2690><TD
2691WIDTH="80%"
2692ALIGN="LEFT"
2693VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002694> the number of characters in the array</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002695></TR
2696><TR
2697><TD
2698WIDTH="20%"
2699ALIGN="RIGHT"
2700VALIGN="TOP"
2701><I
2702CLASS="EMPHASIS"
2703>Returns</I
2704> :</TD
2705><TD
2706WIDTH="80%"
2707ALIGN="LEFT"
2708VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002709>the storage size of
2710the first 'len' characters of ARRAY&#13;</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002711></TR
2712></TBODY
2713></TABLE
2714><P
2715></P
2716></DIV
2717></DIV
2718><HR><DIV
2719CLASS="REFSECT2"
2720><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002721NAME="AEN23036"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002722></A
2723><H3
2724><A
2725NAME="XMLUTF8STRNDUP"
2726></A
2727>xmlUTF8Strndup ()</H3
2728><TABLE
2729BORDER="0"
2730BGCOLOR="#D6E8FF"
2731WIDTH="100%"
2732CELLPADDING="6"
2733><TR
2734><TD
2735><PRE
2736CLASS="PROGRAMLISTING"
2737><A
2738HREF="libxml-tree.html#XMLCHAR"
2739>xmlChar</A
2740>* xmlUTF8Strndup (const <A
2741HREF="libxml-tree.html#XMLCHAR"
2742>xmlChar</A
2743> *utf,
2744 int len);</PRE
2745></TD
2746></TR
2747></TABLE
2748><P
2749>a strndup for array of UTF8's</P
2750><P
2751></P
2752><DIV
2753CLASS="INFORMALTABLE"
2754><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002755NAME="AEN23044"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002756></A
2757><P
2758></P
2759><TABLE
2760BORDER="0"
2761WIDTH="100%"
2762BGCOLOR="#FFD0D0"
2763CELLSPACING="0"
2764CELLPADDING="4"
2765CLASS="CALSTABLE"
2766><TBODY
2767><TR
2768><TD
2769WIDTH="20%"
2770ALIGN="RIGHT"
2771VALIGN="TOP"
2772><TT
2773CLASS="PARAMETER"
2774><I
2775>utf</I
2776></TT
2777>&nbsp;:</TD
2778><TD
2779WIDTH="80%"
2780ALIGN="LEFT"
2781VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002782> the input UTF8 *</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002783></TR
2784><TR
2785><TD
2786WIDTH="20%"
2787ALIGN="RIGHT"
2788VALIGN="TOP"
2789><TT
2790CLASS="PARAMETER"
2791><I
2792>len</I
2793></TT
2794>&nbsp;:</TD
2795><TD
2796WIDTH="80%"
2797ALIGN="LEFT"
2798VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002799> the len of <TT
2800CLASS="PARAMETER"
2801><I
2802>utf</I
2803></TT
2804> (in chars)</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002805></TR
2806><TR
2807><TD
2808WIDTH="20%"
2809ALIGN="RIGHT"
2810VALIGN="TOP"
2811><I
2812CLASS="EMPHASIS"
2813>Returns</I
2814> :</TD
2815><TD
2816WIDTH="80%"
2817ALIGN="LEFT"
2818VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002819>a new UTF8 * or NULL</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002820></TR
2821></TBODY
2822></TABLE
2823><P
2824></P
2825></DIV
2826></DIV
2827><HR><DIV
2828CLASS="REFSECT2"
2829><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002830NAME="AEN23062"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002831></A
2832><H3
2833><A
2834NAME="XMLUTF8STRPOS"
2835></A
2836>xmlUTF8Strpos ()</H3
2837><TABLE
2838BORDER="0"
2839BGCOLOR="#D6E8FF"
2840WIDTH="100%"
2841CELLPADDING="6"
2842><TR
2843><TD
2844><PRE
2845CLASS="PROGRAMLISTING"
2846><A
2847HREF="libxml-tree.html#XMLCHAR"
2848>xmlChar</A
2849>* xmlUTF8Strpos (const <A
2850HREF="libxml-tree.html#XMLCHAR"
2851>xmlChar</A
2852> *utf,
2853 int pos);</PRE
2854></TD
2855></TR
2856></TABLE
2857><P
2858>a function to provide the equivalent of fetching a
2859character from a string array</P
2860><P
2861></P
2862><DIV
2863CLASS="INFORMALTABLE"
2864><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002865NAME="AEN23070"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002866></A
2867><P
2868></P
2869><TABLE
2870BORDER="0"
2871WIDTH="100%"
2872BGCOLOR="#FFD0D0"
2873CELLSPACING="0"
2874CELLPADDING="4"
2875CLASS="CALSTABLE"
2876><TBODY
2877><TR
2878><TD
2879WIDTH="20%"
2880ALIGN="RIGHT"
2881VALIGN="TOP"
2882><TT
2883CLASS="PARAMETER"
2884><I
2885>utf</I
2886></TT
2887>&nbsp;:</TD
2888><TD
2889WIDTH="80%"
2890ALIGN="LEFT"
2891VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002892> the input UTF8 *</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002893></TR
2894><TR
2895><TD
2896WIDTH="20%"
2897ALIGN="RIGHT"
2898VALIGN="TOP"
2899><TT
2900CLASS="PARAMETER"
2901><I
2902>pos</I
2903></TT
2904>&nbsp;:</TD
2905><TD
2906WIDTH="80%"
2907ALIGN="LEFT"
2908VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002909> the position of the desired UTF8 char (in chars)</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002910></TR
2911><TR
2912><TD
2913WIDTH="20%"
2914ALIGN="RIGHT"
2915VALIGN="TOP"
2916><I
2917CLASS="EMPHASIS"
2918>Returns</I
2919> :</TD
2920><TD
2921WIDTH="80%"
2922ALIGN="LEFT"
2923VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002924>a pointer to the UTF8 character or NULL</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002925></TR
2926></TBODY
2927></TABLE
2928><P
2929></P
2930></DIV
2931></DIV
2932><HR><DIV
2933CLASS="REFSECT2"
2934><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002935NAME="AEN23087"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002936></A
2937><H3
2938><A
2939NAME="XMLUTF8STRLOC"
2940></A
2941>xmlUTF8Strloc ()</H3
2942><TABLE
2943BORDER="0"
2944BGCOLOR="#D6E8FF"
2945WIDTH="100%"
2946CELLPADDING="6"
2947><TR
2948><TD
2949><PRE
2950CLASS="PROGRAMLISTING"
2951>int xmlUTF8Strloc (const <A
2952HREF="libxml-tree.html#XMLCHAR"
2953>xmlChar</A
2954> *utf,
2955 const <A
2956HREF="libxml-tree.html#XMLCHAR"
2957>xmlChar</A
2958> *utfchar);</PRE
2959></TD
2960></TR
2961></TABLE
2962><P
2963>a function to provide relative location of a UTF8 char</P
2964><P
2965></P
2966><DIV
2967CLASS="INFORMALTABLE"
2968><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00002969NAME="AEN23095"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002970></A
2971><P
2972></P
2973><TABLE
2974BORDER="0"
2975WIDTH="100%"
2976BGCOLOR="#FFD0D0"
2977CELLSPACING="0"
2978CELLPADDING="4"
2979CLASS="CALSTABLE"
2980><TBODY
2981><TR
2982><TD
2983WIDTH="20%"
2984ALIGN="RIGHT"
2985VALIGN="TOP"
2986><TT
2987CLASS="PARAMETER"
2988><I
2989>utf</I
2990></TT
2991>&nbsp;:</TD
2992><TD
2993WIDTH="80%"
2994ALIGN="LEFT"
2995VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002996> the input UTF8 *</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002997></TR
2998><TR
2999><TD
3000WIDTH="20%"
3001ALIGN="RIGHT"
3002VALIGN="TOP"
3003><TT
3004CLASS="PARAMETER"
3005><I
3006>utfchar</I
3007></TT
3008>&nbsp;:</TD
3009><TD
3010WIDTH="80%"
3011ALIGN="LEFT"
3012VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003013> the UTF8 character to be found</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003014></TR
3015><TR
3016><TD
3017WIDTH="20%"
3018ALIGN="RIGHT"
3019VALIGN="TOP"
3020><I
3021CLASS="EMPHASIS"
3022>Returns</I
3023> :</TD
3024><TD
3025WIDTH="80%"
3026ALIGN="LEFT"
3027VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003028>the relative character position of the desired char
3029or -1 if not found</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003030></TR
3031></TBODY
3032></TABLE
3033><P
3034></P
3035></DIV
3036></DIV
3037><HR><DIV
3038CLASS="REFSECT2"
3039><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00003040NAME="AEN23112"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003041></A
3042><H3
3043><A
3044NAME="XMLUTF8STRSUB"
3045></A
3046>xmlUTF8Strsub ()</H3
3047><TABLE
3048BORDER="0"
3049BGCOLOR="#D6E8FF"
3050WIDTH="100%"
3051CELLPADDING="6"
3052><TR
3053><TD
3054><PRE
3055CLASS="PROGRAMLISTING"
3056><A
3057HREF="libxml-tree.html#XMLCHAR"
3058>xmlChar</A
3059>* xmlUTF8Strsub (const <A
3060HREF="libxml-tree.html#XMLCHAR"
3061>xmlChar</A
3062> *utf,
3063 int start,
3064 int len);</PRE
3065></TD
3066></TR
3067></TABLE
3068><P
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003069>Note: positions are given in units of UTF-8 chars</P
3070><P
3071></P
3072><DIV
3073CLASS="INFORMALTABLE"
3074><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00003075NAME="AEN23120"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003076></A
3077><P
3078></P
3079><TABLE
3080BORDER="0"
3081WIDTH="100%"
3082BGCOLOR="#FFD0D0"
3083CELLSPACING="0"
3084CELLPADDING="4"
3085CLASS="CALSTABLE"
3086><TBODY
3087><TR
3088><TD
3089WIDTH="20%"
3090ALIGN="RIGHT"
3091VALIGN="TOP"
3092><TT
3093CLASS="PARAMETER"
3094><I
3095>utf</I
3096></TT
3097>&nbsp;:</TD
3098><TD
3099WIDTH="80%"
3100ALIGN="LEFT"
3101VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003102> a sequence of UTF-8 encoded bytes</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003103></TR
3104><TR
3105><TD
3106WIDTH="20%"
3107ALIGN="RIGHT"
3108VALIGN="TOP"
3109><TT
3110CLASS="PARAMETER"
3111><I
3112>start</I
3113></TT
3114>&nbsp;:</TD
3115><TD
3116WIDTH="80%"
3117ALIGN="LEFT"
3118VALIGN="TOP"
Daniel Veillardf012a642001-07-23 19:10:52 +00003119> relative pos of first char</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003120></TR
3121><TR
3122><TD
3123WIDTH="20%"
3124ALIGN="RIGHT"
3125VALIGN="TOP"
3126><TT
3127CLASS="PARAMETER"
3128><I
3129>len</I
3130></TT
3131>&nbsp;:</TD
3132><TD
3133WIDTH="80%"
3134ALIGN="LEFT"
3135VALIGN="TOP"
Daniel Veillardf012a642001-07-23 19:10:52 +00003136> total number to copy</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003137></TR
3138><TR
3139><TD
3140WIDTH="20%"
3141ALIGN="RIGHT"
3142VALIGN="TOP"
3143><I
3144CLASS="EMPHASIS"
3145>Returns</I
3146> :</TD
3147><TD
3148WIDTH="80%"
3149ALIGN="LEFT"
3150VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003151>a pointer to a newly created string
3152or NULL if any problem</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003153></TR
3154></TBODY
3155></TABLE
3156><P
3157></P
3158></DIV
3159></DIV
3160><HR><DIV
3161CLASS="REFSECT2"
3162><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00003163NAME="AEN23141"
Daniel Veillarda41123c2001-04-22 19:31:20 +00003164></A
3165><H3
3166><A
3167NAME="XMLUTF8STRLEN"
3168></A
3169>xmlUTF8Strlen ()</H3
3170><TABLE
3171BORDER="0"
3172BGCOLOR="#D6E8FF"
3173WIDTH="100%"
3174CELLPADDING="6"
3175><TR
3176><TD
3177><PRE
3178CLASS="PROGRAMLISTING"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003179>int xmlUTF8Strlen (const <A
3180HREF="libxml-tree.html#XMLCHAR"
3181>xmlChar</A
3182> *utf);</PRE
Daniel Veillarda41123c2001-04-22 19:31:20 +00003183></TD
3184></TR
3185></TABLE
3186><P
3187>compute the lenght of an UTF8 string, it doesn't do a full UTF8
3188checking of the content of the string.</P
3189><P
3190></P
3191><DIV
3192CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00003193><A
Daniel Veillard04382ae2001-09-12 18:51:30 +00003194NAME="AEN23148"
Daniel Veillardbed7b052001-05-19 14:59:49 +00003195></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00003196><P
3197></P
3198><TABLE
3199BORDER="0"
3200WIDTH="100%"
3201BGCOLOR="#FFD0D0"
3202CELLSPACING="0"
3203CELLPADDING="4"
3204CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00003205><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00003206><TR
3207><TD
3208WIDTH="20%"
3209ALIGN="RIGHT"
3210VALIGN="TOP"
3211><TT
3212CLASS="PARAMETER"
3213><I
3214>utf</I
3215></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00003216>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00003217><TD
3218WIDTH="80%"
3219ALIGN="LEFT"
3220VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003221> a sequence of UTF-8 encoded bytes</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00003222></TR
3223><TR
3224><TD
3225WIDTH="20%"
3226ALIGN="RIGHT"
3227VALIGN="TOP"
3228><I
3229CLASS="EMPHASIS"
3230>Returns</I
3231> :</TD
3232><TD
3233WIDTH="80%"
3234ALIGN="LEFT"
3235VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003236>the number of characters in the string or -1 in case of error</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00003237></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00003238></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00003239></TABLE
3240><P
3241></P
3242></DIV
3243></DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +00003244></DIV
3245><DIV
3246CLASS="NAVFOOTER"
3247><BR
3248CLEAR="all"><BR><TABLE
3249WIDTH="100%"
3250BORDER="0"
3251BGCOLOR="#000000"
3252CELLPADDING="1"
3253CELLSPACING="0"
3254><TR
3255><TD
3256WIDTH="25%"
3257BGCOLOR="#C00000"
3258ALIGN="left"
3259><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00003260HREF="libxml-parserinternals.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00003261><FONT
3262COLOR="#FFFFFF"
3263SIZE="3"
3264><B
3265>&#60;&#60;&#60; Previous Page</B
3266></FONT
3267></A
3268></TD
3269><TD
3270WIDTH="25%"
3271BGCOLOR="#0000C0"
3272ALIGN="center"
3273><FONT
3274COLOR="#FFFFFF"
3275SIZE="3"
3276><B
3277><A
3278HREF="book1.html"
3279><FONT
3280COLOR="#FFFFFF"
3281SIZE="3"
3282><B
3283>Home</B
3284></FONT
3285></A
3286></B
3287></FONT
3288></TD
3289><TD
3290WIDTH="25%"
3291BGCOLOR="#00C000"
3292ALIGN="center"
3293><FONT
3294COLOR="#FFFFFF"
3295SIZE="3"
3296><B
3297><A
3298HREF="libxml-lib.html"
3299><FONT
3300COLOR="#FFFFFF"
3301SIZE="3"
3302><B
3303>Up</B
3304></FONT
3305></A
3306></B
3307></FONT
3308></TD
3309><TD
3310WIDTH="25%"
3311BGCOLOR="#C00000"
3312ALIGN="right"
3313><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00003314HREF="libxml-debugxml.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00003315><FONT
3316COLOR="#FFFFFF"
3317SIZE="3"
3318><B
3319>Next Page &#62;&#62;&#62;</B
3320></FONT
3321></A
3322></TD
3323></TR
3324><TR
3325><TD
3326COLSPAN="2"
3327ALIGN="left"
3328><FONT
3329COLOR="#FFFFFF"
3330SIZE="3"
3331><B
3332>parserInternals</B
3333></FONT
3334></TD
3335><TD
3336COLSPAN="2"
3337ALIGN="right"
3338><FONT
3339COLOR="#FFFFFF"
3340SIZE="3"
3341><B
3342>debugXML</B
3343></FONT
3344></TD
3345></TR
3346></TABLE
3347></DIV
3348></BODY
3349></HTML
3350>