blob: a88f8c52b15ecf1f575a29f05a01db92df89ae40 [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 Veillard09ab7e12001-07-10 15:49:44 +0000125NAME="AEN20826"
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 Veillard09ab7e12001-07-10 15:49:44 +0000133NAME="AEN20829"
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 Veillard09ab7e12001-07-10 15:49:44 +0000384NAME="AEN20889"
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 Veillard09ab7e12001-07-10 15:49:44 +0000394NAME="AEN20892"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000395></A
396><H2
397>Details</H2
398><DIV
399CLASS="REFSECT2"
400><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +0000401NAME="AEN20894"
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 Veillardbed7b052001-05-19 14:59:49 +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 Veillard09ab7e12001-07-10 15:49:44 +0000467NAME="AEN20901"
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 Veillardbed7b052001-05-19 14:59:49 +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 Veillard09ab7e12001-07-10 15:49:44 +0000498NAME="AEN20907"
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 Veillard4b8328d2001-07-05 22:48:42 +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 Veillard4b8328d2001-07-05 22:48:42 +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 Veillard4b8328d2001-07-05 22:48:42 +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 Veillard4b8328d2001-07-05 22:48:42 +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 Veillard4b8328d2001-07-05 22:48:42 +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 Veillard09ab7e12001-07-10 15:49:44 +0000626NAME="AEN20936"
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 Veillardbed7b052001-05-19 14:59:49 +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 Veillard09ab7e12001-07-10 15:49:44 +0000659NAME="AEN20942"
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 Veillard4b8328d2001-07-05 22:48:42 +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 Veillard4b8328d2001-07-05 22:48:42 +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 Veillard4b8328d2001-07-05 22:48:42 +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 Veillard4b8328d2001-07-05 22:48:42 +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 Veillard4b8328d2001-07-05 22:48:42 +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 Veillard09ab7e12001-07-10 15:49:44 +0000787NAME="AEN20971"
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 Veillard09ab7e12001-07-10 15:49:44 +0000821NAME="AEN20976"
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 Veillard09ab7e12001-07-10 15:49:44 +0000847NAME="AEN20981"
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 Veillard09ab7e12001-07-10 15:49:44 +0000878NAME="AEN20987"
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 Veillard09ab7e12001-07-10 15:49:44 +0000907NAME="AEN20993"
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 Veillard09ab7e12001-07-10 15:49:44 +0000937NAME="AEN21000"
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 Veillard09ab7e12001-07-10 15:49:44 +0000975NAME="AEN21009"
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 Veillard09ab7e12001-07-10 15:49:44 +00001009NAME="AEN21017"
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 Veillard4b8328d2001-07-05 22:48:42 +00001036> a string describing the char encoding.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001037></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"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001051>the handler or NULL if not found</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001052></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001053></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001054></TABLE
1055><P
1056></P
1057></DIV
1058></DIV
1059><HR><DIV
1060CLASS="REFSECT2"
1061><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001062NAME="AEN21030"
Daniel Veillard3bff2b02000-10-01 20:33:47 +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
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001079HREF="libxml-encoding.html#XMLCHARENCODINGHANDLERPTR"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001080>xmlCharEncodingHandlerPtr</A
1081> xmlFindCharEncodingHandler
1082 (const char *name);</PRE
1083></TD
1084></TR
1085></TABLE
1086><P
1087></P
1088><DIV
1089CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001090><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001091NAME="AEN21036"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001092></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001093><P
1094></P
1095><TABLE
1096BORDER="0"
1097WIDTH="100%"
1098BGCOLOR="#FFD0D0"
1099CELLSPACING="0"
1100CELLPADDING="4"
1101CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001102><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001103><TR
1104><TD
1105WIDTH="20%"
1106ALIGN="RIGHT"
1107VALIGN="TOP"
1108><TT
1109CLASS="PARAMETER"
1110><I
1111>name</I
1112></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001113>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001114><TD
1115WIDTH="80%"
1116ALIGN="LEFT"
1117VALIGN="TOP"
1118>&nbsp;</TD
1119></TR
1120><TR
1121><TD
1122WIDTH="20%"
1123ALIGN="RIGHT"
1124VALIGN="TOP"
1125><I
1126CLASS="EMPHASIS"
1127>Returns</I
1128> :</TD
1129><TD
1130WIDTH="80%"
1131ALIGN="LEFT"
1132VALIGN="TOP"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001133>&nbsp;</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001134></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001135></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001136></TABLE
1137><P
1138></P
1139></DIV
1140></DIV
1141><HR><DIV
1142CLASS="REFSECT2"
1143><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001144NAME="AEN21049"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001145></A
1146><H3
1147><A
1148NAME="XMLADDENCODINGALIAS"
1149></A
1150>xmlAddEncodingAlias ()</H3
1151><TABLE
1152BORDER="0"
1153BGCOLOR="#D6E8FF"
1154WIDTH="100%"
1155CELLPADDING="6"
1156><TR
1157><TD
1158><PRE
1159CLASS="PROGRAMLISTING"
1160>int xmlAddEncodingAlias (const char *name,
1161 const char *alias);</PRE
1162></TD
1163></TR
1164></TABLE
1165><P
1166>Registers and alias <TT
1167CLASS="PARAMETER"
1168><I
1169>alias</I
1170></TT
1171> for an encoding named <TT
1172CLASS="PARAMETER"
1173><I
1174>name</I
1175></TT
1176>. Existing alias
1177will be overwritten.</P
1178><P
1179></P
1180><DIV
1181CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001182><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001183NAME="AEN21057"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001184></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001185><P
1186></P
1187><TABLE
1188BORDER="0"
1189WIDTH="100%"
1190BGCOLOR="#FFD0D0"
1191CELLSPACING="0"
1192CELLPADDING="4"
1193CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001194><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001195><TR
1196><TD
1197WIDTH="20%"
1198ALIGN="RIGHT"
1199VALIGN="TOP"
1200><TT
1201CLASS="PARAMETER"
1202><I
1203>name</I
1204></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001205>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001206><TD
1207WIDTH="80%"
1208ALIGN="LEFT"
1209VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001210> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001211></TR
1212><TR
1213><TD
1214WIDTH="20%"
1215ALIGN="RIGHT"
1216VALIGN="TOP"
1217><TT
1218CLASS="PARAMETER"
1219><I
1220>alias</I
1221></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001222>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001223><TD
1224WIDTH="80%"
1225ALIGN="LEFT"
1226VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001227> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001228></TR
1229><TR
1230><TD
1231WIDTH="20%"
1232ALIGN="RIGHT"
1233VALIGN="TOP"
1234><I
1235CLASS="EMPHASIS"
1236>Returns</I
1237> :</TD
1238><TD
1239WIDTH="80%"
1240ALIGN="LEFT"
1241VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001242>0 in case of success, -1 in case of error</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001243></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001244></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001245></TABLE
1246><P
1247></P
1248></DIV
1249></DIV
1250><HR><DIV
1251CLASS="REFSECT2"
1252><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001253NAME="AEN21074"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001254></A
1255><H3
1256><A
1257NAME="XMLDELENCODINGALIAS"
1258></A
1259>xmlDelEncodingAlias ()</H3
1260><TABLE
1261BORDER="0"
1262BGCOLOR="#D6E8FF"
1263WIDTH="100%"
1264CELLPADDING="6"
1265><TR
1266><TD
1267><PRE
1268CLASS="PROGRAMLISTING"
1269>int xmlDelEncodingAlias (const char *alias);</PRE
1270></TD
1271></TR
1272></TABLE
1273><P
1274>Unregisters an encoding alias <TT
1275CLASS="PARAMETER"
1276><I
1277>alias</I
1278></TT
1279></P
1280><P
1281></P
1282><DIV
1283CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001284><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001285NAME="AEN21081"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001286></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001287><P
1288></P
1289><TABLE
1290BORDER="0"
1291WIDTH="100%"
1292BGCOLOR="#FFD0D0"
1293CELLSPACING="0"
1294CELLPADDING="4"
1295CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001296><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001297><TR
1298><TD
1299WIDTH="20%"
1300ALIGN="RIGHT"
1301VALIGN="TOP"
1302><TT
1303CLASS="PARAMETER"
1304><I
1305>alias</I
1306></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001307>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001308><TD
1309WIDTH="80%"
1310ALIGN="LEFT"
1311VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001312> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001313></TR
1314><TR
1315><TD
1316WIDTH="20%"
1317ALIGN="RIGHT"
1318VALIGN="TOP"
1319><I
1320CLASS="EMPHASIS"
1321>Returns</I
1322> :</TD
1323><TD
1324WIDTH="80%"
1325ALIGN="LEFT"
1326VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001327>0 in case of success, -1 in case of error</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001328></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001329></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001330></TABLE
1331><P
1332></P
1333></DIV
1334></DIV
1335><HR><DIV
1336CLASS="REFSECT2"
1337><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001338NAME="AEN21094"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001339></A
1340><H3
1341><A
1342NAME="XMLGETENCODINGALIAS"
1343></A
1344>xmlGetEncodingAlias ()</H3
1345><TABLE
1346BORDER="0"
1347BGCOLOR="#D6E8FF"
1348WIDTH="100%"
1349CELLPADDING="6"
1350><TR
1351><TD
1352><PRE
1353CLASS="PROGRAMLISTING"
1354>const char* xmlGetEncodingAlias (const char *alias);</PRE
1355></TD
1356></TR
1357></TABLE
1358><P
1359>Lookup an encoding name for the given alias.</P
1360><P
1361></P
1362><DIV
1363CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001364><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001365NAME="AEN21100"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001366></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001367><P
1368></P
1369><TABLE
1370BORDER="0"
1371WIDTH="100%"
1372BGCOLOR="#FFD0D0"
1373CELLSPACING="0"
1374CELLPADDING="4"
1375CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001376><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001377><TR
1378><TD
1379WIDTH="20%"
1380ALIGN="RIGHT"
1381VALIGN="TOP"
1382><TT
1383CLASS="PARAMETER"
1384><I
1385>alias</I
1386></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001387>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001388><TD
1389WIDTH="80%"
1390ALIGN="LEFT"
1391VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001392> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001393></TR
1394><TR
1395><TD
1396WIDTH="20%"
1397ALIGN="RIGHT"
1398VALIGN="TOP"
1399><I
1400CLASS="EMPHASIS"
1401>Returns</I
1402> :</TD
1403><TD
1404WIDTH="80%"
1405ALIGN="LEFT"
1406VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001407>NULL if not found the original name otherwise</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001408></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001409></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001410></TABLE
1411><P
1412></P
1413></DIV
1414></DIV
1415><HR><DIV
1416CLASS="REFSECT2"
1417><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001418NAME="AEN21113"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001419></A
1420><H3
1421><A
1422NAME="XMLCLEANUPENCODINGALIASES"
1423></A
1424>xmlCleanupEncodingAliases ()</H3
1425><TABLE
1426BORDER="0"
1427BGCOLOR="#D6E8FF"
1428WIDTH="100%"
1429CELLPADDING="6"
1430><TR
1431><TD
1432><PRE
1433CLASS="PROGRAMLISTING"
1434>void xmlCleanupEncodingAliases (void);</PRE
1435></TD
1436></TR
1437></TABLE
1438><P
1439>Unregisters all aliases</P
1440><P
1441></P
1442></DIV
1443><HR><DIV
1444CLASS="REFSECT2"
1445><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001446NAME="AEN21119"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001447></A
1448><H3
1449><A
1450NAME="XMLPARSECHARENCODING"
1451></A
1452>xmlParseCharEncoding ()</H3
1453><TABLE
1454BORDER="0"
1455BGCOLOR="#D6E8FF"
1456WIDTH="100%"
1457CELLPADDING="6"
1458><TR
1459><TD
1460><PRE
1461CLASS="PROGRAMLISTING"
1462><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001463HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001464>xmlCharEncoding</A
1465> xmlParseCharEncoding (const char *name);</PRE
1466></TD
1467></TR
1468></TABLE
1469><P
1470>Conpare the string to the known encoding schemes already known. Note
1471that the comparison is case insensitive accordingly to the section
1472[XML] 4.3.3 Character Encoding in Entities.</P
1473><P
1474></P
1475><DIV
1476CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001477><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001478NAME="AEN21126"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001479></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001480><P
1481></P
1482><TABLE
1483BORDER="0"
1484WIDTH="100%"
1485BGCOLOR="#FFD0D0"
1486CELLSPACING="0"
1487CELLPADDING="4"
1488CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001489><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001490><TR
1491><TD
1492WIDTH="20%"
1493ALIGN="RIGHT"
1494VALIGN="TOP"
1495><TT
1496CLASS="PARAMETER"
1497><I
1498>name</I
1499></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001500>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001501><TD
1502WIDTH="80%"
1503ALIGN="LEFT"
1504VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001505> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001506></TR
1507><TR
1508><TD
1509WIDTH="20%"
1510ALIGN="RIGHT"
1511VALIGN="TOP"
1512><I
1513CLASS="EMPHASIS"
1514>Returns</I
1515> :</TD
1516><TD
1517WIDTH="80%"
1518ALIGN="LEFT"
1519VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001520>one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE
1521if not recognized.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001522></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001523></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001524></TABLE
1525><P
1526></P
1527></DIV
1528></DIV
1529><HR><DIV
1530CLASS="REFSECT2"
1531><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001532NAME="AEN21139"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001533></A
1534><H3
1535><A
1536NAME="XMLGETCHARENCODINGNAME"
1537></A
1538>xmlGetCharEncodingName ()</H3
1539><TABLE
1540BORDER="0"
1541BGCOLOR="#D6E8FF"
1542WIDTH="100%"
1543CELLPADDING="6"
1544><TR
1545><TD
1546><PRE
1547CLASS="PROGRAMLISTING"
1548>const char* xmlGetCharEncodingName (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001549HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001550>xmlCharEncoding</A
1551> enc);</PRE
1552></TD
1553></TR
1554></TABLE
1555><P
1556>The "canonical" name for XML encoding.
1557C.f. http://www.w3.org/TR/REC-xml<GTKDOCLINK
1558HREF="CHARENCODING"
1559>charencoding</GTKDOCLINK
1560>
1561Section 4.3.3 Character Encoding in Entities</P
1562><P
1563></P
1564><DIV
1565CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001566><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001567NAME="AEN21147"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001568></A
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001569><P
1570></P
1571><TABLE
1572BORDER="0"
1573WIDTH="100%"
1574BGCOLOR="#FFD0D0"
1575CELLSPACING="0"
1576CELLPADDING="4"
1577CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001578><TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001579><TR
1580><TD
1581WIDTH="20%"
1582ALIGN="RIGHT"
1583VALIGN="TOP"
1584><TT
1585CLASS="PARAMETER"
1586><I
1587>enc</I
1588></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001589>&nbsp;:</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001590><TD
1591WIDTH="80%"
1592ALIGN="LEFT"
1593VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001594> the encoding</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001595></TR
1596><TR
1597><TD
1598WIDTH="20%"
1599ALIGN="RIGHT"
1600VALIGN="TOP"
1601><I
1602CLASS="EMPHASIS"
1603>Returns</I
1604> :</TD
1605><TD
1606WIDTH="80%"
1607ALIGN="LEFT"
1608VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001609>the canonical name for the given encoding</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001610></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001611></TBODY
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001612></TABLE
1613><P
1614></P
1615></DIV
1616></DIV
1617><HR><DIV
1618CLASS="REFSECT2"
1619><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001620NAME="AEN21160"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001621></A
1622><H3
1623><A
1624NAME="XMLDETECTCHARENCODING"
1625></A
1626>xmlDetectCharEncoding ()</H3
1627><TABLE
1628BORDER="0"
1629BGCOLOR="#D6E8FF"
1630WIDTH="100%"
1631CELLPADDING="6"
1632><TR
1633><TD
1634><PRE
1635CLASS="PROGRAMLISTING"
1636><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001637HREF="libxml-encoding.html#XMLCHARENCODING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001638>xmlCharEncoding</A
1639> xmlDetectCharEncoding (unsigned char *in,
1640 int len);</PRE
1641></TD
1642></TR
1643></TABLE
1644><P
1645>Guess the encoding of the entity using the first bytes of the entity content
1646accordingly of the non-normative appendix F of the XML-1.0 recommendation.</P
1647><P
1648></P
1649><DIV
1650CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001651><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001652NAME="AEN21167"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001653></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001654><P
1655></P
1656><TABLE
1657BORDER="0"
1658WIDTH="100%"
1659BGCOLOR="#FFD0D0"
1660CELLSPACING="0"
1661CELLPADDING="4"
1662CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001663><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001664><TR
1665><TD
1666WIDTH="20%"
1667ALIGN="RIGHT"
1668VALIGN="TOP"
1669><TT
1670CLASS="PARAMETER"
1671><I
1672>in</I
1673></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001674>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001675><TD
1676WIDTH="80%"
1677ALIGN="LEFT"
1678VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001679> a pointer to the first bytes of the XML entity, must be at least
16804 bytes long.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001681></TR
1682><TR
1683><TD
1684WIDTH="20%"
1685ALIGN="RIGHT"
1686VALIGN="TOP"
1687><TT
1688CLASS="PARAMETER"
1689><I
1690>len</I
1691></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001692>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001693><TD
1694WIDTH="80%"
1695ALIGN="LEFT"
1696VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001697> pointer to the length of the buffer</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001698></TR
1699><TR
1700><TD
1701WIDTH="20%"
1702ALIGN="RIGHT"
1703VALIGN="TOP"
1704><I
1705CLASS="EMPHASIS"
1706>Returns</I
1707> :</TD
1708><TD
1709WIDTH="80%"
1710ALIGN="LEFT"
1711VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001712>one of the XML_CHAR_ENCODING_... values.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001713></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001714></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001715></TABLE
1716><P
1717></P
1718></DIV
1719></DIV
1720><HR><DIV
1721CLASS="REFSECT2"
1722><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001723NAME="AEN21184"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001724></A
1725><H3
1726><A
1727NAME="XMLCHARENCOUTFUNC"
1728></A
1729>xmlCharEncOutFunc ()</H3
1730><TABLE
1731BORDER="0"
1732BGCOLOR="#D6E8FF"
1733WIDTH="100%"
1734CELLPADDING="6"
1735><TR
1736><TD
1737><PRE
1738CLASS="PROGRAMLISTING"
1739>int xmlCharEncOutFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001740HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001741>xmlCharEncodingHandler</A
1742> *handler,
1743 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001744HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001745>xmlBufferPtr</A
1746> out,
1747 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001748HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001749>xmlBufferPtr</A
1750> in);</PRE
1751></TD
1752></TR
1753></TABLE
1754><P
1755>Generic front-end for the encoding handler output function
1756a first call with <TT
1757CLASS="PARAMETER"
1758><I
1759>in</I
1760></TT
1761> == NULL has to be made firs to initiate the
1762output in case of non-stateless encoding needing to initiate their
1763state or the output (like the BOM in UTF16).
1764In case of UTF8 sequence conversion errors for the given encoder,
1765the content will be automatically remapped to a CharRef sequence.</P
1766><P
1767></P
1768><DIV
1769CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001770><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001771NAME="AEN21194"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001772></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001773><P
1774></P
1775><TABLE
1776BORDER="0"
1777WIDTH="100%"
1778BGCOLOR="#FFD0D0"
1779CELLSPACING="0"
1780CELLPADDING="4"
1781CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001782><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001783><TR
1784><TD
1785WIDTH="20%"
1786ALIGN="RIGHT"
1787VALIGN="TOP"
1788><TT
1789CLASS="PARAMETER"
1790><I
1791>handler</I
1792></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001793>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001794><TD
1795WIDTH="80%"
1796ALIGN="LEFT"
1797VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001798> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001799></TR
1800><TR
1801><TD
1802WIDTH="20%"
1803ALIGN="RIGHT"
1804VALIGN="TOP"
1805><TT
1806CLASS="PARAMETER"
1807><I
1808>out</I
1809></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001810>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001811><TD
1812WIDTH="80%"
1813ALIGN="LEFT"
1814VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001815> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001816></TR
1817><TR
1818><TD
1819WIDTH="20%"
1820ALIGN="RIGHT"
1821VALIGN="TOP"
1822><TT
1823CLASS="PARAMETER"
1824><I
Daniel Veillard06047432000-04-24 11:33:38 +00001825>in</I
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001826></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001827>&nbsp;:</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001828><TD
1829WIDTH="80%"
1830ALIGN="LEFT"
1831VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001832> an xmlBuffer for the input</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001833></TR
1834><TR
1835><TD
1836WIDTH="20%"
1837ALIGN="RIGHT"
1838VALIGN="TOP"
1839><I
1840CLASS="EMPHASIS"
1841>Returns</I
1842> :</TD
1843><TD
1844WIDTH="80%"
1845ALIGN="LEFT"
1846VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001847>the number of byte written if success, or
1848-1 general error
1849-2 if the transcoding fails (for *in is not valid utf8 string or
1850the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001851></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001852></TBODY
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001853></TABLE
1854><P
1855></P
1856></DIV
1857></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00001858><HR><DIV
1859CLASS="REFSECT2"
1860><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001861NAME="AEN21215"
Daniel Veillard06047432000-04-24 11:33:38 +00001862></A
1863><H3
1864><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001865NAME="XMLCHARENCINFUNC"
Daniel Veillard06047432000-04-24 11:33:38 +00001866></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001867>xmlCharEncInFunc ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001868><TABLE
1869BORDER="0"
1870BGCOLOR="#D6E8FF"
1871WIDTH="100%"
1872CELLPADDING="6"
1873><TR
1874><TD
1875><PRE
1876CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001877>int xmlCharEncInFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001878HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001879>xmlCharEncodingHandler</A
1880> *handler,
1881 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001882HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001883>xmlBufferPtr</A
1884> out,
1885 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001886HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001887>xmlBufferPtr</A
1888> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001889></TD
1890></TR
1891></TABLE
1892><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001893>Generic front-end for the encoding handler input function</P
Daniel Veillard06047432000-04-24 11:33:38 +00001894><P
1895></P
1896><DIV
1897CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001898><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001899NAME="AEN21224"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001900></A
Daniel Veillard06047432000-04-24 11:33:38 +00001901><P
1902></P
1903><TABLE
1904BORDER="0"
1905WIDTH="100%"
1906BGCOLOR="#FFD0D0"
1907CELLSPACING="0"
1908CELLPADDING="4"
1909CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001910><TBODY
Daniel Veillard06047432000-04-24 11:33:38 +00001911><TR
1912><TD
1913WIDTH="20%"
1914ALIGN="RIGHT"
1915VALIGN="TOP"
1916><TT
1917CLASS="PARAMETER"
1918><I
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001919>handler</I
Daniel Veillard06047432000-04-24 11:33:38 +00001920></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001921>&nbsp;:</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001922><TD
1923WIDTH="80%"
1924ALIGN="LEFT"
1925VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001926> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001927></TR
1928><TR
1929><TD
1930WIDTH="20%"
1931ALIGN="RIGHT"
1932VALIGN="TOP"
1933><TT
1934CLASS="PARAMETER"
1935><I
1936>out</I
1937></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001938>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001939><TD
1940WIDTH="80%"
1941ALIGN="LEFT"
1942VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001943> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001944></TR
1945><TR
1946><TD
1947WIDTH="20%"
1948ALIGN="RIGHT"
1949VALIGN="TOP"
1950><TT
1951CLASS="PARAMETER"
1952><I
1953>in</I
1954></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001955>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001956><TD
1957WIDTH="80%"
1958ALIGN="LEFT"
1959VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001960> an xmlBuffer for the input</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001961></TR
1962><TR
1963><TD
1964WIDTH="20%"
1965ALIGN="RIGHT"
1966VALIGN="TOP"
1967><I
1968CLASS="EMPHASIS"
1969>Returns</I
1970> :</TD
1971><TD
1972WIDTH="80%"
1973ALIGN="LEFT"
1974VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00001975>the number of byte written if success, or
1976-1 general error
1977-2 if the transcoding fails (for *in is not valid utf8 string or
1978the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001979></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001980></TBODY
Daniel Veillard06047432000-04-24 11:33:38 +00001981></TABLE
1982><P
1983></P
1984></DIV
1985></DIV
1986><HR><DIV
1987CLASS="REFSECT2"
1988><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00001989NAME="AEN21245"
Daniel Veillard06047432000-04-24 11:33:38 +00001990></A
1991><H3
1992><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001993NAME="XMLCHARENCFIRSTLINE"
Daniel Veillard06047432000-04-24 11:33:38 +00001994></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001995>xmlCharEncFirstLine ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001996><TABLE
1997BORDER="0"
1998BGCOLOR="#D6E8FF"
1999WIDTH="100%"
2000CELLPADDING="6"
2001><TR
2002><TD
2003><PRE
2004CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002005>int xmlCharEncFirstLine (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002006HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002007>xmlCharEncodingHandler</A
2008> *handler,
2009 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002010HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002011>xmlBufferPtr</A
2012> out,
2013 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002014HREF="libxml-tree.html#XMLBUFFERPTR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002015>xmlBufferPtr</A
2016> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00002017></TD
2018></TR
2019></TABLE
2020><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002021>Front-end for the encoding handler input function, but handle only
2022the very first line, i.e. limit itself to 45 chars.</P
Daniel Veillard06047432000-04-24 11:33:38 +00002023><P
2024></P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002025><DIV
2026CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002027><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002028NAME="AEN21254"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002029></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002030><P
2031></P
2032><TABLE
2033BORDER="0"
2034WIDTH="100%"
2035BGCOLOR="#FFD0D0"
2036CELLSPACING="0"
2037CELLPADDING="4"
2038CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002039><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002040><TR
2041><TD
2042WIDTH="20%"
2043ALIGN="RIGHT"
2044VALIGN="TOP"
2045><TT
2046CLASS="PARAMETER"
2047><I
2048>handler</I
2049></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002050>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002051><TD
2052WIDTH="80%"
2053ALIGN="LEFT"
2054VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002055> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002056></TR
2057><TR
2058><TD
2059WIDTH="20%"
2060ALIGN="RIGHT"
2061VALIGN="TOP"
2062><TT
2063CLASS="PARAMETER"
2064><I
2065>out</I
2066></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002067>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002068><TD
2069WIDTH="80%"
2070ALIGN="LEFT"
2071VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002072> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002073></TR
2074><TR
2075><TD
2076WIDTH="20%"
2077ALIGN="RIGHT"
2078VALIGN="TOP"
2079><TT
2080CLASS="PARAMETER"
2081><I
2082>in</I
2083></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002084>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002085><TD
2086WIDTH="80%"
2087ALIGN="LEFT"
2088VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002089> an xmlBuffer for the input</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002090></TR
2091><TR
2092><TD
2093WIDTH="20%"
2094ALIGN="RIGHT"
2095VALIGN="TOP"
2096><I
2097CLASS="EMPHASIS"
2098>Returns</I
2099> :</TD
2100><TD
2101WIDTH="80%"
2102ALIGN="LEFT"
2103VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002104>the number of byte written if success, or
2105-1 general error
2106-2 if the transcoding fails (for *in is not valid utf8 string or
2107the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002108></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002109></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002110></TABLE
2111><P
2112></P
2113></DIV
2114></DIV
2115><HR><DIV
2116CLASS="REFSECT2"
2117><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002118NAME="AEN21275"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002119></A
2120><H3
2121><A
2122NAME="XMLCHARENCCLOSEFUNC"
2123></A
2124>xmlCharEncCloseFunc ()</H3
2125><TABLE
2126BORDER="0"
2127BGCOLOR="#D6E8FF"
2128WIDTH="100%"
2129CELLPADDING="6"
2130><TR
2131><TD
2132><PRE
2133CLASS="PROGRAMLISTING"
2134>int xmlCharEncCloseFunc (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00002135HREF="libxml-encoding.html#XMLCHARENCODINGHANDLER"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002136>xmlCharEncodingHandler</A
2137> *handler);</PRE
2138></TD
2139></TR
2140></TABLE
2141><P
2142>Generic front-end for hencoding handler close function</P
2143><P
2144></P
2145><DIV
2146CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002147><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002148NAME="AEN21282"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002149></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002150><P
2151></P
2152><TABLE
2153BORDER="0"
2154WIDTH="100%"
2155BGCOLOR="#FFD0D0"
2156CELLSPACING="0"
2157CELLPADDING="4"
2158CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002159><TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002160><TR
2161><TD
2162WIDTH="20%"
2163ALIGN="RIGHT"
2164VALIGN="TOP"
2165><TT
2166CLASS="PARAMETER"
2167><I
2168>handler</I
2169></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002170>&nbsp;:</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002171><TD
2172WIDTH="80%"
2173ALIGN="LEFT"
2174VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002175> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002176></TR
2177><TR
2178><TD
2179WIDTH="20%"
2180ALIGN="RIGHT"
2181VALIGN="TOP"
2182><I
2183CLASS="EMPHASIS"
2184>Returns</I
2185> :</TD
2186><TD
2187WIDTH="80%"
2188ALIGN="LEFT"
2189VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002190>0 if success, or -1 in case of error</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002191></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002192></TBODY
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002193></TABLE
2194><P
2195></P
2196></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00002197></DIV
Daniel Veillarda41123c2001-04-22 19:31:20 +00002198><HR><DIV
2199CLASS="REFSECT2"
2200><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002201NAME="AEN21295"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002202></A
2203><H3
2204><A
2205NAME="UTF8TOISOLAT1"
2206></A
2207>UTF8Toisolat1 ()</H3
2208><TABLE
2209BORDER="0"
2210BGCOLOR="#D6E8FF"
2211WIDTH="100%"
2212CELLPADDING="6"
2213><TR
2214><TD
2215><PRE
2216CLASS="PROGRAMLISTING"
2217>int UTF8Toisolat1 (unsigned char *out,
2218 int *outlen,
2219 unsigned char *in,
2220 int *inlen);</PRE
2221></TD
2222></TR
2223></TABLE
2224><P
2225>Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1
2226block of chars out.</P
2227><P
2228></P
2229><DIV
2230CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002231><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002232NAME="AEN21301"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002233></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00002234><P
2235></P
2236><TABLE
2237BORDER="0"
2238WIDTH="100%"
2239BGCOLOR="#FFD0D0"
2240CELLSPACING="0"
2241CELLPADDING="4"
2242CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002243><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002244><TR
2245><TD
2246WIDTH="20%"
2247ALIGN="RIGHT"
2248VALIGN="TOP"
2249><TT
2250CLASS="PARAMETER"
2251><I
2252>out</I
2253></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002254>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002255><TD
2256WIDTH="80%"
2257ALIGN="LEFT"
2258VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002259> a pointer to an array of bytes to store the result</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002260></TR
2261><TR
2262><TD
2263WIDTH="20%"
2264ALIGN="RIGHT"
2265VALIGN="TOP"
2266><TT
2267CLASS="PARAMETER"
2268><I
2269>outlen</I
2270></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002271>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002272><TD
2273WIDTH="80%"
2274ALIGN="LEFT"
2275VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002276> the length of <TT
2277CLASS="PARAMETER"
2278><I
2279>out</I
2280></TT
2281></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002282></TR
2283><TR
2284><TD
2285WIDTH="20%"
2286ALIGN="RIGHT"
2287VALIGN="TOP"
2288><TT
2289CLASS="PARAMETER"
2290><I
2291>in</I
2292></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002293>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002294><TD
2295WIDTH="80%"
2296ALIGN="LEFT"
2297VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002298> a pointer to an array of UTF-8 chars</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002299></TR
2300><TR
2301><TD
2302WIDTH="20%"
2303ALIGN="RIGHT"
2304VALIGN="TOP"
2305><TT
2306CLASS="PARAMETER"
2307><I
2308>inlen</I
2309></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002310>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002311><TD
2312WIDTH="80%"
2313ALIGN="LEFT"
2314VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002315> the length of <TT
2316CLASS="PARAMETER"
2317><I
2318>in</I
2319></TT
2320></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002321></TR
2322><TR
2323><TD
2324WIDTH="20%"
2325ALIGN="RIGHT"
2326VALIGN="TOP"
2327><I
2328CLASS="EMPHASIS"
2329>Returns</I
2330> :</TD
2331><TD
2332WIDTH="80%"
2333ALIGN="LEFT"
2334VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002335>0 if success, -2 if the transcoding fails, or -1 otherwise
2336The value of <TT
2337CLASS="PARAMETER"
2338><I
2339>inlen</I
2340></TT
2341> after return is the number of octets consumed
2342as the return value is positive, else unpredictiable.
2343The value of <TT
2344CLASS="PARAMETER"
2345><I
2346>outlen</I
2347></TT
2348> after return is the number of ocetes consumed.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002349></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002350></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002351></TABLE
2352><P
2353></P
2354></DIV
2355></DIV
2356><HR><DIV
2357CLASS="REFSECT2"
2358><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002359NAME="AEN21330"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002360></A
2361><H3
2362><A
2363NAME="ISOLAT1TOUTF8"
2364></A
2365>isolat1ToUTF8 ()</H3
2366><TABLE
2367BORDER="0"
2368BGCOLOR="#D6E8FF"
2369WIDTH="100%"
2370CELLPADDING="6"
2371><TR
2372><TD
2373><PRE
2374CLASS="PROGRAMLISTING"
2375>int isolat1ToUTF8 (unsigned char *out,
2376 int *outlen,
2377 unsigned char *in,
2378 int *inlen);</PRE
2379></TD
2380></TR
2381></TABLE
2382><P
2383>Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8
2384block of chars out.</P
2385><P
2386></P
2387><DIV
2388CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002389><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002390NAME="AEN21336"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002391></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00002392><P
2393></P
2394><TABLE
2395BORDER="0"
2396WIDTH="100%"
2397BGCOLOR="#FFD0D0"
2398CELLSPACING="0"
2399CELLPADDING="4"
2400CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002401><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002402><TR
2403><TD
2404WIDTH="20%"
2405ALIGN="RIGHT"
2406VALIGN="TOP"
2407><TT
2408CLASS="PARAMETER"
2409><I
2410>out</I
2411></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002412>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002413><TD
2414WIDTH="80%"
2415ALIGN="LEFT"
2416VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002417> a pointer to an array of bytes to store the result</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002418></TR
2419><TR
2420><TD
2421WIDTH="20%"
2422ALIGN="RIGHT"
2423VALIGN="TOP"
2424><TT
2425CLASS="PARAMETER"
2426><I
2427>outlen</I
2428></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002429>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002430><TD
2431WIDTH="80%"
2432ALIGN="LEFT"
2433VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002434> the length of <TT
2435CLASS="PARAMETER"
2436><I
2437>out</I
2438></TT
2439></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002440></TR
2441><TR
2442><TD
2443WIDTH="20%"
2444ALIGN="RIGHT"
2445VALIGN="TOP"
2446><TT
2447CLASS="PARAMETER"
2448><I
2449>in</I
2450></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002451>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002452><TD
2453WIDTH="80%"
2454ALIGN="LEFT"
2455VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002456> a pointer to an array of ISO Latin 1 chars</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002457></TR
2458><TR
2459><TD
2460WIDTH="20%"
2461ALIGN="RIGHT"
2462VALIGN="TOP"
2463><TT
2464CLASS="PARAMETER"
2465><I
2466>inlen</I
2467></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002468>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002469><TD
2470WIDTH="80%"
2471ALIGN="LEFT"
2472VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002473> the length of <TT
2474CLASS="PARAMETER"
2475><I
2476>in</I
2477></TT
2478></TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002479></TR
2480><TR
2481><TD
2482WIDTH="20%"
2483ALIGN="RIGHT"
2484VALIGN="TOP"
2485><I
2486CLASS="EMPHASIS"
2487>Returns</I
2488> :</TD
2489><TD
2490WIDTH="80%"
2491ALIGN="LEFT"
2492VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002493>0 if success, or -1 otherwise
2494The value of <TT
2495CLASS="PARAMETER"
2496><I
2497>inlen</I
2498></TT
2499> after return is the number of octets consumed
2500as the return value is positive, else unpredictiable.
2501The value of <TT
2502CLASS="PARAMETER"
2503><I
2504>outlen</I
2505></TT
2506> after return is the number of ocetes consumed.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002507></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002508></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002509></TABLE
2510><P
2511></P
2512></DIV
2513></DIV
2514><HR><DIV
2515CLASS="REFSECT2"
2516><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002517NAME="AEN21365"
Daniel Veillarda41123c2001-04-22 19:31:20 +00002518></A
2519><H3
2520><A
2521NAME="XMLCHECKUTF8"
2522></A
2523>xmlCheckUTF8 ()</H3
2524><TABLE
2525BORDER="0"
2526BGCOLOR="#D6E8FF"
2527WIDTH="100%"
2528CELLPADDING="6"
2529><TR
2530><TD
2531><PRE
2532CLASS="PROGRAMLISTING"
2533>int xmlCheckUTF8 (unsigned char *utf);</PRE
2534></TD
2535></TR
2536></TABLE
2537><P
2538>Checks <TT
2539CLASS="PARAMETER"
2540><I
2541>utf</I
2542></TT
2543> for being valid utf-8. <TT
2544CLASS="PARAMETER"
2545><I
2546>utf</I
2547></TT
2548> is assumed to be
2549null-terminated. This function is not super-strict, as it will
2550allow longer utf-8 sequences than necessary. Note that Java is
2551capable of producing these sequences if provoked. Also note, this
2552routine checks for the 4-byte maxiumum size, but does not check for
25530x10ffff maximum value.</P
2554><P
2555></P
2556><DIV
2557CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002558><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002559NAME="AEN21373"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002560></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00002561><P
2562></P
2563><TABLE
2564BORDER="0"
2565WIDTH="100%"
2566BGCOLOR="#FFD0D0"
2567CELLSPACING="0"
2568CELLPADDING="4"
2569CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00002570><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002571><TR
2572><TD
2573WIDTH="20%"
2574ALIGN="RIGHT"
2575VALIGN="TOP"
2576><TT
2577CLASS="PARAMETER"
2578><I
2579>utf</I
2580></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00002581>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002582><TD
2583WIDTH="80%"
2584ALIGN="LEFT"
2585VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002586> Pointer to putative utf-8 encoded string.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002587></TR
2588><TR
2589><TD
2590WIDTH="20%"
2591ALIGN="RIGHT"
2592VALIGN="TOP"
2593><I
2594CLASS="EMPHASIS"
2595>Returns</I
2596> :</TD
2597><TD
2598WIDTH="80%"
2599ALIGN="LEFT"
2600VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002601> true if <TT
2602CLASS="PARAMETER"
2603><I
2604>utf</I
2605></TT
2606> is valid.</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00002607></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00002608></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00002609></TABLE
2610><P
2611></P
2612></DIV
2613></DIV
2614><HR><DIV
2615CLASS="REFSECT2"
2616><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002617NAME="AEN21387"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002618></A
2619><H3
2620><A
2621NAME="XMLUTF8STRSIZE"
2622></A
2623>xmlUTF8Strsize ()</H3
2624><TABLE
2625BORDER="0"
2626BGCOLOR="#D6E8FF"
2627WIDTH="100%"
2628CELLPADDING="6"
2629><TR
2630><TD
2631><PRE
2632CLASS="PROGRAMLISTING"
2633>int xmlUTF8Strsize (const <A
2634HREF="libxml-tree.html#XMLCHAR"
2635>xmlChar</A
2636> *utf,
2637 int len);</PRE
2638></TD
2639></TR
2640></TABLE
2641><P
2642>storage size of an UTF8 string</P
2643><P
2644></P
2645><DIV
2646CLASS="INFORMALTABLE"
2647><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002648NAME="AEN21394"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002649></A
2650><P
2651></P
2652><TABLE
2653BORDER="0"
2654WIDTH="100%"
2655BGCOLOR="#FFD0D0"
2656CELLSPACING="0"
2657CELLPADDING="4"
2658CLASS="CALSTABLE"
2659><TBODY
2660><TR
2661><TD
2662WIDTH="20%"
2663ALIGN="RIGHT"
2664VALIGN="TOP"
2665><TT
2666CLASS="PARAMETER"
2667><I
2668>utf</I
2669></TT
2670>&nbsp;:</TD
2671><TD
2672WIDTH="80%"
2673ALIGN="LEFT"
2674VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002675> a sequence of UTF-8 encoded bytes</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002676></TR
2677><TR
2678><TD
2679WIDTH="20%"
2680ALIGN="RIGHT"
2681VALIGN="TOP"
2682><TT
2683CLASS="PARAMETER"
2684><I
2685>len</I
2686></TT
2687>&nbsp;:</TD
2688><TD
2689WIDTH="80%"
2690ALIGN="LEFT"
2691VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002692> the number of characters in the array</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002693></TR
2694><TR
2695><TD
2696WIDTH="20%"
2697ALIGN="RIGHT"
2698VALIGN="TOP"
2699><I
2700CLASS="EMPHASIS"
2701>Returns</I
2702> :</TD
2703><TD
2704WIDTH="80%"
2705ALIGN="LEFT"
2706VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002707>the storage size of
2708the first 'len' characters of ARRAY&#13;</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002709></TR
2710></TBODY
2711></TABLE
2712><P
2713></P
2714></DIV
2715></DIV
2716><HR><DIV
2717CLASS="REFSECT2"
2718><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002719NAME="AEN21411"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002720></A
2721><H3
2722><A
2723NAME="XMLUTF8STRNDUP"
2724></A
2725>xmlUTF8Strndup ()</H3
2726><TABLE
2727BORDER="0"
2728BGCOLOR="#D6E8FF"
2729WIDTH="100%"
2730CELLPADDING="6"
2731><TR
2732><TD
2733><PRE
2734CLASS="PROGRAMLISTING"
2735><A
2736HREF="libxml-tree.html#XMLCHAR"
2737>xmlChar</A
2738>* xmlUTF8Strndup (const <A
2739HREF="libxml-tree.html#XMLCHAR"
2740>xmlChar</A
2741> *utf,
2742 int len);</PRE
2743></TD
2744></TR
2745></TABLE
2746><P
2747>a strndup for array of UTF8's</P
2748><P
2749></P
2750><DIV
2751CLASS="INFORMALTABLE"
2752><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002753NAME="AEN21419"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002754></A
2755><P
2756></P
2757><TABLE
2758BORDER="0"
2759WIDTH="100%"
2760BGCOLOR="#FFD0D0"
2761CELLSPACING="0"
2762CELLPADDING="4"
2763CLASS="CALSTABLE"
2764><TBODY
2765><TR
2766><TD
2767WIDTH="20%"
2768ALIGN="RIGHT"
2769VALIGN="TOP"
2770><TT
2771CLASS="PARAMETER"
2772><I
2773>utf</I
2774></TT
2775>&nbsp;:</TD
2776><TD
2777WIDTH="80%"
2778ALIGN="LEFT"
2779VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002780> the input UTF8 *</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002781></TR
2782><TR
2783><TD
2784WIDTH="20%"
2785ALIGN="RIGHT"
2786VALIGN="TOP"
2787><TT
2788CLASS="PARAMETER"
2789><I
2790>len</I
2791></TT
2792>&nbsp;:</TD
2793><TD
2794WIDTH="80%"
2795ALIGN="LEFT"
2796VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002797> the len of <TT
2798CLASS="PARAMETER"
2799><I
2800>utf</I
2801></TT
2802> (in chars)</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002803></TR
2804><TR
2805><TD
2806WIDTH="20%"
2807ALIGN="RIGHT"
2808VALIGN="TOP"
2809><I
2810CLASS="EMPHASIS"
2811>Returns</I
2812> :</TD
2813><TD
2814WIDTH="80%"
2815ALIGN="LEFT"
2816VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002817>a new UTF8 * or NULL</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002818></TR
2819></TBODY
2820></TABLE
2821><P
2822></P
2823></DIV
2824></DIV
2825><HR><DIV
2826CLASS="REFSECT2"
2827><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002828NAME="AEN21437"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002829></A
2830><H3
2831><A
2832NAME="XMLUTF8STRPOS"
2833></A
2834>xmlUTF8Strpos ()</H3
2835><TABLE
2836BORDER="0"
2837BGCOLOR="#D6E8FF"
2838WIDTH="100%"
2839CELLPADDING="6"
2840><TR
2841><TD
2842><PRE
2843CLASS="PROGRAMLISTING"
2844><A
2845HREF="libxml-tree.html#XMLCHAR"
2846>xmlChar</A
2847>* xmlUTF8Strpos (const <A
2848HREF="libxml-tree.html#XMLCHAR"
2849>xmlChar</A
2850> *utf,
2851 int pos);</PRE
2852></TD
2853></TR
2854></TABLE
2855><P
2856>a function to provide the equivalent of fetching a
2857character from a string array</P
2858><P
2859></P
2860><DIV
2861CLASS="INFORMALTABLE"
2862><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002863NAME="AEN21445"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002864></A
2865><P
2866></P
2867><TABLE
2868BORDER="0"
2869WIDTH="100%"
2870BGCOLOR="#FFD0D0"
2871CELLSPACING="0"
2872CELLPADDING="4"
2873CLASS="CALSTABLE"
2874><TBODY
2875><TR
2876><TD
2877WIDTH="20%"
2878ALIGN="RIGHT"
2879VALIGN="TOP"
2880><TT
2881CLASS="PARAMETER"
2882><I
2883>utf</I
2884></TT
2885>&nbsp;:</TD
2886><TD
2887WIDTH="80%"
2888ALIGN="LEFT"
2889VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002890> the input UTF8 *</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002891></TR
2892><TR
2893><TD
2894WIDTH="20%"
2895ALIGN="RIGHT"
2896VALIGN="TOP"
2897><TT
2898CLASS="PARAMETER"
2899><I
2900>pos</I
2901></TT
2902>&nbsp;:</TD
2903><TD
2904WIDTH="80%"
2905ALIGN="LEFT"
2906VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002907> the position of the desired UTF8 char (in chars)</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002908></TR
2909><TR
2910><TD
2911WIDTH="20%"
2912ALIGN="RIGHT"
2913VALIGN="TOP"
2914><I
2915CLASS="EMPHASIS"
2916>Returns</I
2917> :</TD
2918><TD
2919WIDTH="80%"
2920ALIGN="LEFT"
2921VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002922>a pointer to the UTF8 character or NULL</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002923></TR
2924></TBODY
2925></TABLE
2926><P
2927></P
2928></DIV
2929></DIV
2930><HR><DIV
2931CLASS="REFSECT2"
2932><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002933NAME="AEN21462"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002934></A
2935><H3
2936><A
2937NAME="XMLUTF8STRLOC"
2938></A
2939>xmlUTF8Strloc ()</H3
2940><TABLE
2941BORDER="0"
2942BGCOLOR="#D6E8FF"
2943WIDTH="100%"
2944CELLPADDING="6"
2945><TR
2946><TD
2947><PRE
2948CLASS="PROGRAMLISTING"
2949>int xmlUTF8Strloc (const <A
2950HREF="libxml-tree.html#XMLCHAR"
2951>xmlChar</A
2952> *utf,
2953 const <A
2954HREF="libxml-tree.html#XMLCHAR"
2955>xmlChar</A
2956> *utfchar);</PRE
2957></TD
2958></TR
2959></TABLE
2960><P
2961>a function to provide relative location of a UTF8 char</P
2962><P
2963></P
2964><DIV
2965CLASS="INFORMALTABLE"
2966><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00002967NAME="AEN21470"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002968></A
2969><P
2970></P
2971><TABLE
2972BORDER="0"
2973WIDTH="100%"
2974BGCOLOR="#FFD0D0"
2975CELLSPACING="0"
2976CELLPADDING="4"
2977CLASS="CALSTABLE"
2978><TBODY
2979><TR
2980><TD
2981WIDTH="20%"
2982ALIGN="RIGHT"
2983VALIGN="TOP"
2984><TT
2985CLASS="PARAMETER"
2986><I
2987>utf</I
2988></TT
2989>&nbsp;:</TD
2990><TD
2991WIDTH="80%"
2992ALIGN="LEFT"
2993VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00002994> the input UTF8 *</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00002995></TR
2996><TR
2997><TD
2998WIDTH="20%"
2999ALIGN="RIGHT"
3000VALIGN="TOP"
3001><TT
3002CLASS="PARAMETER"
3003><I
3004>utfchar</I
3005></TT
3006>&nbsp;:</TD
3007><TD
3008WIDTH="80%"
3009ALIGN="LEFT"
3010VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003011> the UTF8 character to be found</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003012></TR
3013><TR
3014><TD
3015WIDTH="20%"
3016ALIGN="RIGHT"
3017VALIGN="TOP"
3018><I
3019CLASS="EMPHASIS"
3020>Returns</I
3021> :</TD
3022><TD
3023WIDTH="80%"
3024ALIGN="LEFT"
3025VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003026>the relative character position of the desired char
3027or -1 if not found</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003028></TR
3029></TBODY
3030></TABLE
3031><P
3032></P
3033></DIV
3034></DIV
3035><HR><DIV
3036CLASS="REFSECT2"
3037><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00003038NAME="AEN21487"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003039></A
3040><H3
3041><A
3042NAME="XMLUTF8STRSUB"
3043></A
3044>xmlUTF8Strsub ()</H3
3045><TABLE
3046BORDER="0"
3047BGCOLOR="#D6E8FF"
3048WIDTH="100%"
3049CELLPADDING="6"
3050><TR
3051><TD
3052><PRE
3053CLASS="PROGRAMLISTING"
3054><A
3055HREF="libxml-tree.html#XMLCHAR"
3056>xmlChar</A
3057>* xmlUTF8Strsub (const <A
3058HREF="libxml-tree.html#XMLCHAR"
3059>xmlChar</A
3060> *utf,
3061 int start,
3062 int len);</PRE
3063></TD
3064></TR
3065></TABLE
3066><P
3067><TT
3068CLASS="PARAMETER"
3069><I
3070>start</I
3071></TT
3072>: relative pos of first char
3073<TT
3074CLASS="PARAMETER"
3075><I
3076>len</I
3077></TT
3078>: total number to copy</P
3079><P
3080>Note: positions are given in units of UTF-8 chars</P
3081><P
3082></P
3083><DIV
3084CLASS="INFORMALTABLE"
3085><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00003086NAME="AEN21498"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003087></A
3088><P
3089></P
3090><TABLE
3091BORDER="0"
3092WIDTH="100%"
3093BGCOLOR="#FFD0D0"
3094CELLSPACING="0"
3095CELLPADDING="4"
3096CLASS="CALSTABLE"
3097><TBODY
3098><TR
3099><TD
3100WIDTH="20%"
3101ALIGN="RIGHT"
3102VALIGN="TOP"
3103><TT
3104CLASS="PARAMETER"
3105><I
3106>utf</I
3107></TT
3108>&nbsp;:</TD
3109><TD
3110WIDTH="80%"
3111ALIGN="LEFT"
3112VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003113> a sequence of UTF-8 encoded bytes</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003114></TR
3115><TR
3116><TD
3117WIDTH="20%"
3118ALIGN="RIGHT"
3119VALIGN="TOP"
3120><TT
3121CLASS="PARAMETER"
3122><I
3123>start</I
3124></TT
3125>&nbsp;:</TD
3126><TD
3127WIDTH="80%"
3128ALIGN="LEFT"
3129VALIGN="TOP"
3130>&nbsp;</TD
3131></TR
3132><TR
3133><TD
3134WIDTH="20%"
3135ALIGN="RIGHT"
3136VALIGN="TOP"
3137><TT
3138CLASS="PARAMETER"
3139><I
3140>len</I
3141></TT
3142>&nbsp;:</TD
3143><TD
3144WIDTH="80%"
3145ALIGN="LEFT"
3146VALIGN="TOP"
3147>&nbsp;</TD
3148></TR
3149><TR
3150><TD
3151WIDTH="20%"
3152ALIGN="RIGHT"
3153VALIGN="TOP"
3154><I
3155CLASS="EMPHASIS"
3156>Returns</I
3157> :</TD
3158><TD
3159WIDTH="80%"
3160ALIGN="LEFT"
3161VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003162>a pointer to a newly created string
3163or NULL if any problem</TD
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003164></TR
3165></TBODY
3166></TABLE
3167><P
3168></P
3169></DIV
3170></DIV
3171><HR><DIV
3172CLASS="REFSECT2"
3173><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00003174NAME="AEN21519"
Daniel Veillarda41123c2001-04-22 19:31:20 +00003175></A
3176><H3
3177><A
3178NAME="XMLUTF8STRLEN"
3179></A
3180>xmlUTF8Strlen ()</H3
3181><TABLE
3182BORDER="0"
3183BGCOLOR="#D6E8FF"
3184WIDTH="100%"
3185CELLPADDING="6"
3186><TR
3187><TD
3188><PRE
3189CLASS="PROGRAMLISTING"
Daniel Veillard4ec885a2001-06-17 10:31:07 +00003190>int xmlUTF8Strlen (const <A
3191HREF="libxml-tree.html#XMLCHAR"
3192>xmlChar</A
3193> *utf);</PRE
Daniel Veillarda41123c2001-04-22 19:31:20 +00003194></TD
3195></TR
3196></TABLE
3197><P
3198>compute the lenght of an UTF8 string, it doesn't do a full UTF8
3199checking of the content of the string.</P
3200><P
3201></P
3202><DIV
3203CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00003204><A
Daniel Veillard09ab7e12001-07-10 15:49:44 +00003205NAME="AEN21526"
Daniel Veillardbed7b052001-05-19 14:59:49 +00003206></A
Daniel Veillarda41123c2001-04-22 19:31:20 +00003207><P
3208></P
3209><TABLE
3210BORDER="0"
3211WIDTH="100%"
3212BGCOLOR="#FFD0D0"
3213CELLSPACING="0"
3214CELLPADDING="4"
3215CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00003216><TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00003217><TR
3218><TD
3219WIDTH="20%"
3220ALIGN="RIGHT"
3221VALIGN="TOP"
3222><TT
3223CLASS="PARAMETER"
3224><I
3225>utf</I
3226></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00003227>&nbsp;:</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00003228><TD
3229WIDTH="80%"
3230ALIGN="LEFT"
3231VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003232> a sequence of UTF-8 encoded bytes</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00003233></TR
3234><TR
3235><TD
3236WIDTH="20%"
3237ALIGN="RIGHT"
3238VALIGN="TOP"
3239><I
3240CLASS="EMPHASIS"
3241>Returns</I
3242> :</TD
3243><TD
3244WIDTH="80%"
3245ALIGN="LEFT"
3246VALIGN="TOP"
Daniel Veillard4b8328d2001-07-05 22:48:42 +00003247>the number of characters in the string or -1 in case of error</TD
Daniel Veillarda41123c2001-04-22 19:31:20 +00003248></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00003249></TBODY
Daniel Veillarda41123c2001-04-22 19:31:20 +00003250></TABLE
3251><P
3252></P
3253></DIV
3254></DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +00003255></DIV
3256><DIV
3257CLASS="NAVFOOTER"
3258><BR
3259CLEAR="all"><BR><TABLE
3260WIDTH="100%"
3261BORDER="0"
3262BGCOLOR="#000000"
3263CELLPADDING="1"
3264CELLSPACING="0"
3265><TR
3266><TD
3267WIDTH="25%"
3268BGCOLOR="#C00000"
3269ALIGN="left"
3270><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00003271HREF="libxml-parserinternals.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00003272><FONT
3273COLOR="#FFFFFF"
3274SIZE="3"
3275><B
3276>&#60;&#60;&#60; Previous Page</B
3277></FONT
3278></A
3279></TD
3280><TD
3281WIDTH="25%"
3282BGCOLOR="#0000C0"
3283ALIGN="center"
3284><FONT
3285COLOR="#FFFFFF"
3286SIZE="3"
3287><B
3288><A
3289HREF="book1.html"
3290><FONT
3291COLOR="#FFFFFF"
3292SIZE="3"
3293><B
3294>Home</B
3295></FONT
3296></A
3297></B
3298></FONT
3299></TD
3300><TD
3301WIDTH="25%"
3302BGCOLOR="#00C000"
3303ALIGN="center"
3304><FONT
3305COLOR="#FFFFFF"
3306SIZE="3"
3307><B
3308><A
3309HREF="libxml-lib.html"
3310><FONT
3311COLOR="#FFFFFF"
3312SIZE="3"
3313><B
3314>Up</B
3315></FONT
3316></A
3317></B
3318></FONT
3319></TD
3320><TD
3321WIDTH="25%"
3322BGCOLOR="#C00000"
3323ALIGN="right"
3324><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00003325HREF="libxml-debugxml.html"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00003326><FONT
3327COLOR="#FFFFFF"
3328SIZE="3"
3329><B
3330>Next Page &#62;&#62;&#62;</B
3331></FONT
3332></A
3333></TD
3334></TR
3335><TR
3336><TD
3337COLSPAN="2"
3338ALIGN="left"
3339><FONT
3340COLOR="#FFFFFF"
3341SIZE="3"
3342><B
3343>parserInternals</B
3344></FONT
3345></TD
3346><TD
3347COLSPAN="2"
3348ALIGN="right"
3349><FONT
3350COLOR="#FFFFFF"
3351SIZE="3"
3352><B
3353>debugXML</B
3354></FONT
3355></TD
3356></TR
3357></TABLE
3358></DIV
3359></BODY
3360></HTML
3361>