blob: d0395c68871ab09ee78fb5eb0477500d97bb3977 [file] [log] [blame]
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001<HTML
2><HEAD
3><TITLE
4>encoding</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00007CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><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"
16HREF="gnome-xml-parserinternals.html"><LINK
17REL="NEXT"
18TITLE="debugXML"
19HREF="gnome-xml-debugxml.html"></HEAD
20><BODY
21BGCOLOR="#FFFFFF"
22TEXT="#000000"
23><DIV
24CLASS="NAVHEADER"
25><TABLE
26WIDTH="100%"
27BORDER="0"
28BGCOLOR="#000000"
29CELLPADDING="1"
30CELLSPACING="0"
31><TR
32><TH
33COLSPAN="4"
34ALIGN="center"
35><FONT
36COLOR="#FFFFFF"
37SIZE="5"
38>Gnome XML Library Reference Manual</FONT
39></TH
40></TR
41><TR
42><TD
43WIDTH="25%"
44BGCOLOR="#C00000"
45ALIGN="left"
46><A
47HREF="gnome-xml-parserinternals.html"
48><FONT
49COLOR="#FFFFFF"
50SIZE="3"
51><B
52>&#60;&#60;&#60; Previous Page</B
53></FONT
54></A
55></TD
56><TD
57WIDTH="25%"
58BGCOLOR="#0000C0"
59ALIGN="center"
60><FONT
61COLOR="#FFFFFF"
62SIZE="3"
63><B
64><A
65HREF="book1.html"
66><FONT
67COLOR="#FFFFFF"
68SIZE="3"
69><B
70>Home</B
71></FONT
72></A
73></B
74></FONT
75></TD
76><TD
77WIDTH="25%"
78BGCOLOR="#00C000"
79ALIGN="center"
80><FONT
81COLOR="#FFFFFF"
82SIZE="3"
83><B
84><A
85HREF="libxml-lib.html"
86><FONT
87COLOR="#FFFFFF"
88SIZE="3"
89><B
90>Up</B
91></FONT
92></A
93></B
94></FONT
95></TD
96><TD
97WIDTH="25%"
98BGCOLOR="#C00000"
99ALIGN="right"
100><A
101HREF="gnome-xml-debugxml.html"
102><FONT
103COLOR="#FFFFFF"
104SIZE="3"
105><B
106>Next Page &#62;&#62;&#62;</B
107></FONT
108></A
109></TD
110></TR
111></TABLE
112></DIV
113><H1
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000114>encoding</H1
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000115><DIV
116CLASS="REFNAMEDIV"
117><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000118NAME="AEN17554"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000119></A
120><H2
121>Name</H2
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000122>encoding &#8212; </DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000123><DIV
124CLASS="REFSYNOPSISDIV"
125><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000126NAME="AEN17557"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000127></A
128><H2
129>Synopsis</H2
130><TABLE
131BORDER="0"
132BGCOLOR="#D6E8FF"
133WIDTH="100%"
134CELLPADDING="6"
135><TR
136><TD
137><PRE
138CLASS="SYNOPSIS"
139>&#13;
140
141enum <A
142HREF="gnome-xml-encoding.html#XMLCHARENCODING"
143>xmlCharEncoding</A
144>;
145int (<A
146HREF="gnome-xml-encoding.html#XMLCHARENCODINGINPUTFUNC"
147>*xmlCharEncodingInputFunc</A
148>) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000149 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000150 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000151 int *inlen);
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000152int (<A
153HREF="gnome-xml-encoding.html#XMLCHARENCODINGOUTPUTFUNC"
154>*xmlCharEncodingOutputFunc</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 Veillard3f6f7f62000-06-30 17:58:25 +0000159struct <A
160HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
161>xmlCharEncodingHandler</A
162>;
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000163typedef <A
164HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
165>xmlCharEncodingHandlerPtr</A
166>;
167void <A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000168HREF="gnome-xml-encoding.html#XMLINITCHARENCODINGHANDLERS"
169>xmlInitCharEncodingHandlers</A
170> (void);
171void <A
172HREF="gnome-xml-encoding.html#XMLCLEANUPCHARENCODINGHANDLERS"
173>xmlCleanupCharEncodingHandlers</A
174> (void);
175void <A
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000176HREF="gnome-xml-encoding.html#XMLREGISTERCHARENCODINGHANDLER"
177>xmlRegisterCharEncodingHandler</A
178> (<A
179HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
180>xmlCharEncodingHandlerPtr</A
181> handler);
182<A
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000183HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
184>xmlCharEncodingHandlerPtr</A
185> <A
186HREF="gnome-xml-encoding.html#XMLGETCHARENCODINGHANDLER"
187>xmlGetCharEncodingHandler</A
188>
189 (<A
190HREF="gnome-xml-encoding.html#XMLCHARENCODING"
191>xmlCharEncoding</A
192> enc);
193<A
194HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
195>xmlCharEncodingHandlerPtr</A
196> <A
197HREF="gnome-xml-encoding.html#XMLFINDCHARENCODINGHANDLER"
198>xmlFindCharEncodingHandler</A
199>
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000200 (const char *name);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000201int <A
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000202HREF="gnome-xml-encoding.html#XMLADDENCODINGALIAS"
203>xmlAddEncodingAlias</A
204> (const char *name,
205 const char *alias);
206int <A
207HREF="gnome-xml-encoding.html#XMLDELENCODINGALIAS"
208>xmlDelEncodingAlias</A
209> (const char *alias);
210const char* <A
211HREF="gnome-xml-encoding.html#XMLGETENCODINGALIAS"
212>xmlGetEncodingAlias</A
213> (const char *alias);
214void <A
215HREF="gnome-xml-encoding.html#XMLCLEANUPENCODINGALIASES"
216>xmlCleanupEncodingAliases</A
217> (void);
218<A
219HREF="gnome-xml-encoding.html#XMLCHARENCODING"
220>xmlCharEncoding</A
221> <A
222HREF="gnome-xml-encoding.html#XMLPARSECHARENCODING"
223>xmlParseCharEncoding</A
224> (const char *name);
225const char* <A
226HREF="gnome-xml-encoding.html#XMLGETCHARENCODINGNAME"
227>xmlGetCharEncodingName</A
228> (<A
229HREF="gnome-xml-encoding.html#XMLCHARENCODING"
230>xmlCharEncoding</A
231> enc);
232<A
233HREF="gnome-xml-encoding.html#XMLCHARENCODING"
234>xmlCharEncoding</A
235> <A
236HREF="gnome-xml-encoding.html#XMLDETECTCHARENCODING"
237>xmlDetectCharEncoding</A
238> (unsigned char *in,
239 int len);
240int <A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000241HREF="gnome-xml-encoding.html#XMLCHECKUTF8"
242>xmlCheckUTF8</A
243> (unsigned char *utf);
244int <A
245HREF="gnome-xml-encoding.html#XMLCHARENCOUTFUNC"
246>xmlCharEncOutFunc</A
247> (<A
248HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
249>xmlCharEncodingHandler</A
250> *handler,
251 <A
252HREF="gnome-xml-tree.html#XMLBUFFERPTR"
253>xmlBufferPtr</A
254> out,
255 <A
256HREF="gnome-xml-tree.html#XMLBUFFERPTR"
257>xmlBufferPtr</A
258> in);
259int <A
260HREF="gnome-xml-encoding.html#XMLCHARENCINFUNC"
261>xmlCharEncInFunc</A
262> (<A
263HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
264>xmlCharEncodingHandler</A
265> *handler,
266 <A
267HREF="gnome-xml-tree.html#XMLBUFFERPTR"
268>xmlBufferPtr</A
269> out,
270 <A
271HREF="gnome-xml-tree.html#XMLBUFFERPTR"
272>xmlBufferPtr</A
273> in);
274int <A
275HREF="gnome-xml-encoding.html#XMLCHARENCFIRSTLINE"
276>xmlCharEncFirstLine</A
277> (<A
278HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
279>xmlCharEncodingHandler</A
280> *handler,
281 <A
282HREF="gnome-xml-tree.html#XMLBUFFERPTR"
283>xmlBufferPtr</A
284> out,
285 <A
286HREF="gnome-xml-tree.html#XMLBUFFERPTR"
287>xmlBufferPtr</A
288> in);
289int <A
290HREF="gnome-xml-encoding.html#XMLCHARENCCLOSEFUNC"
291>xmlCharEncCloseFunc</A
292> (<A
293HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
294>xmlCharEncodingHandler</A
295> *handler);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000296></TD
297></TR
298></TABLE
299></DIV
300><DIV
301CLASS="REFSECT1"
302><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000303NAME="AEN17599"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000304></A
305><H2
306>Description</H2
307><P
308></P
309></DIV
310><DIV
311CLASS="REFSECT1"
312><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000313NAME="AEN17602"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000314></A
315><H2
316>Details</H2
317><DIV
318CLASS="REFSECT2"
319><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000320NAME="AEN17604"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000321></A
322><H3
323><A
324NAME="XMLCHARENCODING"
325></A
326>enum xmlCharEncoding</H3
327><TABLE
328BORDER="0"
329BGCOLOR="#D6E8FF"
330WIDTH="100%"
331CELLPADDING="6"
332><TR
333><TD
334><PRE
335CLASS="PROGRAMLISTING"
336>typedef enum {
337 XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
338 XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
339 XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
340 XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
341 XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
342 XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
343 XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
344 XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
345 XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
346 XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
347 XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
348 XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
349 XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
350 XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
351 XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
352 XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
353 XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
354 XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
355 XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
356 XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
357 XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
358 XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
Daniel Veillarde46e20d2000-07-14 15:02:46 +0000359 XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
360 XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000361} xmlCharEncoding;</PRE
362></TD
363></TR
364></TABLE
365><P
366></P
367></DIV
368><HR><DIV
369CLASS="REFSECT2"
370><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000371NAME="AEN17609"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000372></A
373><H3
374><A
375NAME="XMLCHARENCODINGINPUTFUNC"
376></A
377>xmlCharEncodingInputFunc ()</H3
378><TABLE
379BORDER="0"
380BGCOLOR="#D6E8FF"
381WIDTH="100%"
382CELLPADDING="6"
383><TR
384><TD
385><PRE
386CLASS="PROGRAMLISTING"
387>int (*xmlCharEncodingInputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000388 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000389 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000390 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000391></TD
392></TR
393></TABLE
394><P
395></P
396><DIV
397CLASS="INFORMALTABLE"
398><P
399></P
400><TABLE
401BORDER="0"
402WIDTH="100%"
403BGCOLOR="#FFD0D0"
404CELLSPACING="0"
405CELLPADDING="4"
406CLASS="CALSTABLE"
407><TR
408><TD
409WIDTH="20%"
410ALIGN="RIGHT"
411VALIGN="TOP"
412><TT
413CLASS="PARAMETER"
414><I
415>out</I
416></TT
417>&nbsp;:</TD
418><TD
419WIDTH="80%"
420ALIGN="LEFT"
421VALIGN="TOP"
422>&nbsp;</TD
423></TR
424><TR
425><TD
426WIDTH="20%"
427ALIGN="RIGHT"
428VALIGN="TOP"
429><TT
430CLASS="PARAMETER"
431><I
432>outlen</I
433></TT
434>&nbsp;:</TD
435><TD
436WIDTH="80%"
437ALIGN="LEFT"
438VALIGN="TOP"
439>&nbsp;</TD
440></TR
441><TR
442><TD
443WIDTH="20%"
444ALIGN="RIGHT"
445VALIGN="TOP"
446><TT
447CLASS="PARAMETER"
448><I
449>in</I
450></TT
451>&nbsp;:</TD
452><TD
453WIDTH="80%"
454ALIGN="LEFT"
455VALIGN="TOP"
456>&nbsp;</TD
457></TR
458><TR
459><TD
460WIDTH="20%"
461ALIGN="RIGHT"
462VALIGN="TOP"
463><TT
464CLASS="PARAMETER"
465><I
466>inlen</I
467></TT
468>&nbsp;:</TD
469><TD
470WIDTH="80%"
471ALIGN="LEFT"
472VALIGN="TOP"
473>&nbsp;</TD
474></TR
475><TR
476><TD
477WIDTH="20%"
478ALIGN="RIGHT"
479VALIGN="TOP"
480><I
481CLASS="EMPHASIS"
482>Returns</I
483> :</TD
484><TD
485WIDTH="80%"
486ALIGN="LEFT"
487VALIGN="TOP"
488>&nbsp;</TD
489></TR
490></TABLE
491><P
492></P
493></DIV
494></DIV
495><HR><DIV
496CLASS="REFSECT2"
497><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000498NAME="AEN17639"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000499></A
500><H3
501><A
502NAME="XMLCHARENCODINGOUTPUTFUNC"
503></A
504>xmlCharEncodingOutputFunc ()</H3
505><TABLE
506BORDER="0"
507BGCOLOR="#D6E8FF"
508WIDTH="100%"
509CELLPADDING="6"
510><TR
511><TD
512><PRE
513CLASS="PROGRAMLISTING"
514>int (*xmlCharEncodingOutputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000515 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000516 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000517 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000518></TD
519></TR
520></TABLE
521><P
522></P
523><DIV
524CLASS="INFORMALTABLE"
525><P
526></P
527><TABLE
528BORDER="0"
529WIDTH="100%"
530BGCOLOR="#FFD0D0"
531CELLSPACING="0"
532CELLPADDING="4"
533CLASS="CALSTABLE"
534><TR
535><TD
536WIDTH="20%"
537ALIGN="RIGHT"
538VALIGN="TOP"
539><TT
540CLASS="PARAMETER"
541><I
542>out</I
543></TT
544>&nbsp;:</TD
545><TD
546WIDTH="80%"
547ALIGN="LEFT"
548VALIGN="TOP"
549>&nbsp;</TD
550></TR
551><TR
552><TD
553WIDTH="20%"
554ALIGN="RIGHT"
555VALIGN="TOP"
556><TT
557CLASS="PARAMETER"
558><I
559>outlen</I
560></TT
561>&nbsp;:</TD
562><TD
563WIDTH="80%"
564ALIGN="LEFT"
565VALIGN="TOP"
566>&nbsp;</TD
567></TR
568><TR
569><TD
570WIDTH="20%"
571ALIGN="RIGHT"
572VALIGN="TOP"
573><TT
574CLASS="PARAMETER"
575><I
576>in</I
577></TT
578>&nbsp;:</TD
579><TD
580WIDTH="80%"
581ALIGN="LEFT"
582VALIGN="TOP"
583>&nbsp;</TD
584></TR
585><TR
586><TD
587WIDTH="20%"
588ALIGN="RIGHT"
589VALIGN="TOP"
590><TT
591CLASS="PARAMETER"
592><I
593>inlen</I
594></TT
595>&nbsp;:</TD
596><TD
597WIDTH="80%"
598ALIGN="LEFT"
599VALIGN="TOP"
600>&nbsp;</TD
601></TR
602><TR
603><TD
604WIDTH="20%"
605ALIGN="RIGHT"
606VALIGN="TOP"
607><I
608CLASS="EMPHASIS"
609>Returns</I
610> :</TD
611><TD
612WIDTH="80%"
613ALIGN="LEFT"
614VALIGN="TOP"
615>&nbsp;</TD
616></TR
617></TABLE
618><P
619></P
620></DIV
621></DIV
622><HR><DIV
623CLASS="REFSECT2"
624><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000625NAME="AEN17669"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000626></A
627><H3
628><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000629NAME="XMLCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000630></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000631>struct xmlCharEncodingHandler</H3
632><TABLE
633BORDER="0"
634BGCOLOR="#D6E8FF"
635WIDTH="100%"
636CELLPADDING="6"
637><TR
638><TD
639><PRE
640CLASS="PROGRAMLISTING"
641>struct xmlCharEncodingHandler {
642 char *name;
643 xmlCharEncodingInputFunc input;
644 xmlCharEncodingOutputFunc output;
645#ifdef LIBXML_ICONV_ENABLED
646 iconv_t iconv_in;
647 iconv_t iconv_out;
648#endif /* LIBXML_ICONV_ENABLED */
649};</PRE
650></TD
651></TR
652></TABLE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000653><P
654></P
655></DIV
656><HR><DIV
657CLASS="REFSECT2"
658><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000659NAME="AEN17674"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000660></A
661><H3
662><A
663NAME="XMLCHARENCODINGHANDLERPTR"
664></A
665>xmlCharEncodingHandlerPtr</H3
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000666><TABLE
667BORDER="0"
668BGCOLOR="#D6E8FF"
669WIDTH="100%"
670CELLPADDING="6"
671><TR
672><TD
673><PRE
674CLASS="PROGRAMLISTING"
675>typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;</PRE
676></TD
677></TR
678></TABLE
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000679><P
680></P
681></DIV
682><HR><DIV
683CLASS="REFSECT2"
684><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000685NAME="AEN17679"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000686></A
687><H3
688><A
689NAME="XMLINITCHARENCODINGHANDLERS"
690></A
691>xmlInitCharEncodingHandlers ()</H3
692><TABLE
693BORDER="0"
694BGCOLOR="#D6E8FF"
695WIDTH="100%"
696CELLPADDING="6"
697><TR
698><TD
699><PRE
700CLASS="PROGRAMLISTING"
701>void xmlInitCharEncodingHandlers (void);</PRE
702></TD
703></TR
704></TABLE
705><P
706>Initialize the char encoding support, it registers the default
707encoding supported.
708NOTE: while public, this function usually doesn't need to be called
709in normal processing.</P
710><P
711></P
712></DIV
713><HR><DIV
714CLASS="REFSECT2"
715><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000716NAME="AEN17685"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000717></A
718><H3
719><A
720NAME="XMLCLEANUPCHARENCODINGHANDLERS"
721></A
722>xmlCleanupCharEncodingHandlers ()</H3
723><TABLE
724BORDER="0"
725BGCOLOR="#D6E8FF"
726WIDTH="100%"
727CELLPADDING="6"
728><TR
729><TD
730><PRE
731CLASS="PROGRAMLISTING"
732>void xmlCleanupCharEncodingHandlers (void);</PRE
733></TD
734></TR
735></TABLE
736><P
737>Cleanup the memory allocated for the char encoding support, it
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000738unregisters all the encoding handlers and the aliases.</P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000739><P
740></P
741></DIV
742><HR><DIV
743CLASS="REFSECT2"
744><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000745NAME="AEN17691"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000746></A
747><H3
748><A
749NAME="XMLREGISTERCHARENCODINGHANDLER"
750></A
751>xmlRegisterCharEncodingHandler ()</H3
752><TABLE
753BORDER="0"
754BGCOLOR="#D6E8FF"
755WIDTH="100%"
756CELLPADDING="6"
757><TR
758><TD
759><PRE
760CLASS="PROGRAMLISTING"
761>void xmlRegisterCharEncodingHandler (<A
762HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
763>xmlCharEncodingHandlerPtr</A
764> handler);</PRE
765></TD
766></TR
767></TABLE
768><P
769>Register the char encoding handler, surprizing, isn't it ?</P
770><P
771></P
772><DIV
773CLASS="INFORMALTABLE"
774><P
775></P
776><TABLE
777BORDER="0"
778WIDTH="100%"
779BGCOLOR="#FFD0D0"
780CELLSPACING="0"
781CELLPADDING="4"
782CLASS="CALSTABLE"
783><TR
784><TD
785WIDTH="20%"
786ALIGN="RIGHT"
787VALIGN="TOP"
788><TT
789CLASS="PARAMETER"
790><I
791>handler</I
792></TT
793>&nbsp;:</TD
794><TD
795WIDTH="80%"
796ALIGN="LEFT"
797VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000798> the xmlCharEncodingHandlerPtr handler block</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000799></TR
800></TABLE
801><P
802></P
803></DIV
804></DIV
805><HR><DIV
806CLASS="REFSECT2"
807><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000808NAME="AEN17707"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000809></A
810><H3
811><A
812NAME="XMLGETCHARENCODINGHANDLER"
813></A
814>xmlGetCharEncodingHandler ()</H3
815><TABLE
816BORDER="0"
817BGCOLOR="#D6E8FF"
818WIDTH="100%"
819CELLPADDING="6"
820><TR
821><TD
822><PRE
823CLASS="PROGRAMLISTING"
824><A
825HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
826>xmlCharEncodingHandlerPtr</A
827> xmlGetCharEncodingHandler
828 (<A
829HREF="gnome-xml-encoding.html#XMLCHARENCODING"
830>xmlCharEncoding</A
831> enc);</PRE
832></TD
833></TR
834></TABLE
835><P
836>Search in the registrered set the handler able to read/write that encoding.</P
837><P
838></P
839><DIV
840CLASS="INFORMALTABLE"
841><P
842></P
843><TABLE
844BORDER="0"
845WIDTH="100%"
846BGCOLOR="#FFD0D0"
847CELLSPACING="0"
848CELLPADDING="4"
849CLASS="CALSTABLE"
850><TR
851><TD
852WIDTH="20%"
853ALIGN="RIGHT"
854VALIGN="TOP"
855><TT
856CLASS="PARAMETER"
857><I
858>enc</I
859></TT
860>&nbsp;:</TD
861><TD
862WIDTH="80%"
863ALIGN="LEFT"
864VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000865> a string describing the char encoding.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000866></TR
867><TR
868><TD
869WIDTH="20%"
870ALIGN="RIGHT"
871VALIGN="TOP"
872><I
873CLASS="EMPHASIS"
874>Returns</I
875> :</TD
876><TD
877WIDTH="80%"
878ALIGN="LEFT"
879VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000880>the handler or NULL if not found</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000881></TR
882></TABLE
883><P
884></P
885></DIV
886></DIV
887><HR><DIV
888CLASS="REFSECT2"
889><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000890NAME="AEN17728"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000891></A
892><H3
893><A
894NAME="XMLFINDCHARENCODINGHANDLER"
895></A
896>xmlFindCharEncodingHandler ()</H3
897><TABLE
898BORDER="0"
899BGCOLOR="#D6E8FF"
900WIDTH="100%"
901CELLPADDING="6"
902><TR
903><TD
904><PRE
905CLASS="PROGRAMLISTING"
906><A
907HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
908>xmlCharEncodingHandlerPtr</A
909> xmlFindCharEncodingHandler
910 (const char *name);</PRE
911></TD
912></TR
913></TABLE
914><P
915></P
916><DIV
917CLASS="INFORMALTABLE"
918><P
919></P
920><TABLE
921BORDER="0"
922WIDTH="100%"
923BGCOLOR="#FFD0D0"
924CELLSPACING="0"
925CELLPADDING="4"
926CLASS="CALSTABLE"
927><TR
928><TD
929WIDTH="20%"
930ALIGN="RIGHT"
931VALIGN="TOP"
932><TT
933CLASS="PARAMETER"
934><I
935>name</I
936></TT
937>&nbsp;:</TD
938><TD
939WIDTH="80%"
940ALIGN="LEFT"
941VALIGN="TOP"
942>&nbsp;</TD
943></TR
944><TR
945><TD
946WIDTH="20%"
947ALIGN="RIGHT"
948VALIGN="TOP"
949><I
950CLASS="EMPHASIS"
951>Returns</I
952> :</TD
953><TD
954WIDTH="80%"
955ALIGN="LEFT"
956VALIGN="TOP"
957>&nbsp;</TD
958></TR
959></TABLE
960><P
961></P
962></DIV
963></DIV
964><HR><DIV
965CLASS="REFSECT2"
966><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +0000967NAME="AEN17747"
Daniel Veillard3bff2b02000-10-01 20:33:47 +0000968></A
969><H3
970><A
971NAME="XMLADDENCODINGALIAS"
972></A
973>xmlAddEncodingAlias ()</H3
974><TABLE
975BORDER="0"
976BGCOLOR="#D6E8FF"
977WIDTH="100%"
978CELLPADDING="6"
979><TR
980><TD
981><PRE
982CLASS="PROGRAMLISTING"
983>int xmlAddEncodingAlias (const char *name,
984 const char *alias);</PRE
985></TD
986></TR
987></TABLE
988><P
989>Registers and alias <TT
990CLASS="PARAMETER"
991><I
992>alias</I
993></TT
994> for an encoding named <TT
995CLASS="PARAMETER"
996><I
997>name</I
998></TT
999>. Existing alias
1000will be overwritten.</P
1001><P
1002></P
1003><DIV
1004CLASS="INFORMALTABLE"
1005><P
1006></P
1007><TABLE
1008BORDER="0"
1009WIDTH="100%"
1010BGCOLOR="#FFD0D0"
1011CELLSPACING="0"
1012CELLPADDING="4"
1013CLASS="CALSTABLE"
1014><TR
1015><TD
1016WIDTH="20%"
1017ALIGN="RIGHT"
1018VALIGN="TOP"
1019><TT
1020CLASS="PARAMETER"
1021><I
1022>name</I
1023></TT
1024>&nbsp;:</TD
1025><TD
1026WIDTH="80%"
1027ALIGN="LEFT"
1028VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001029> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001030></TR
1031><TR
1032><TD
1033WIDTH="20%"
1034ALIGN="RIGHT"
1035VALIGN="TOP"
1036><TT
1037CLASS="PARAMETER"
1038><I
1039>alias</I
1040></TT
1041>&nbsp;:</TD
1042><TD
1043WIDTH="80%"
1044ALIGN="LEFT"
1045VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001046> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001047></TR
1048><TR
1049><TD
1050WIDTH="20%"
1051ALIGN="RIGHT"
1052VALIGN="TOP"
1053><I
1054CLASS="EMPHASIS"
1055>Returns</I
1056> :</TD
1057><TD
1058WIDTH="80%"
1059ALIGN="LEFT"
1060VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001061>0 in case of success, -1 in case of error</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001062></TR
1063></TABLE
1064><P
1065></P
1066></DIV
1067></DIV
1068><HR><DIV
1069CLASS="REFSECT2"
1070><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001071NAME="AEN17772"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001072></A
1073><H3
1074><A
1075NAME="XMLDELENCODINGALIAS"
1076></A
1077>xmlDelEncodingAlias ()</H3
1078><TABLE
1079BORDER="0"
1080BGCOLOR="#D6E8FF"
1081WIDTH="100%"
1082CELLPADDING="6"
1083><TR
1084><TD
1085><PRE
1086CLASS="PROGRAMLISTING"
1087>int xmlDelEncodingAlias (const char *alias);</PRE
1088></TD
1089></TR
1090></TABLE
1091><P
1092>Unregisters an encoding alias <TT
1093CLASS="PARAMETER"
1094><I
1095>alias</I
1096></TT
1097></P
1098><P
1099></P
1100><DIV
1101CLASS="INFORMALTABLE"
1102><P
1103></P
1104><TABLE
1105BORDER="0"
1106WIDTH="100%"
1107BGCOLOR="#FFD0D0"
1108CELLSPACING="0"
1109CELLPADDING="4"
1110CLASS="CALSTABLE"
1111><TR
1112><TD
1113WIDTH="20%"
1114ALIGN="RIGHT"
1115VALIGN="TOP"
1116><TT
1117CLASS="PARAMETER"
1118><I
1119>alias</I
1120></TT
1121>&nbsp;:</TD
1122><TD
1123WIDTH="80%"
1124ALIGN="LEFT"
1125VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001126> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001127></TR
1128><TR
1129><TD
1130WIDTH="20%"
1131ALIGN="RIGHT"
1132VALIGN="TOP"
1133><I
1134CLASS="EMPHASIS"
1135>Returns</I
1136> :</TD
1137><TD
1138WIDTH="80%"
1139ALIGN="LEFT"
1140VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001141>0 in case of success, -1 in case of error</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001142></TR
1143></TABLE
1144><P
1145></P
1146></DIV
1147></DIV
1148><HR><DIV
1149CLASS="REFSECT2"
1150><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001151NAME="AEN17792"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001152></A
1153><H3
1154><A
1155NAME="XMLGETENCODINGALIAS"
1156></A
1157>xmlGetEncodingAlias ()</H3
1158><TABLE
1159BORDER="0"
1160BGCOLOR="#D6E8FF"
1161WIDTH="100%"
1162CELLPADDING="6"
1163><TR
1164><TD
1165><PRE
1166CLASS="PROGRAMLISTING"
1167>const char* xmlGetEncodingAlias (const char *alias);</PRE
1168></TD
1169></TR
1170></TABLE
1171><P
1172>Lookup an encoding name for the given alias.</P
1173><P
1174></P
1175><DIV
1176CLASS="INFORMALTABLE"
1177><P
1178></P
1179><TABLE
1180BORDER="0"
1181WIDTH="100%"
1182BGCOLOR="#FFD0D0"
1183CELLSPACING="0"
1184CELLPADDING="4"
1185CLASS="CALSTABLE"
1186><TR
1187><TD
1188WIDTH="20%"
1189ALIGN="RIGHT"
1190VALIGN="TOP"
1191><TT
1192CLASS="PARAMETER"
1193><I
1194>alias</I
1195></TT
1196>&nbsp;:</TD
1197><TD
1198WIDTH="80%"
1199ALIGN="LEFT"
1200VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001201> the alias name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001202></TR
1203><TR
1204><TD
1205WIDTH="20%"
1206ALIGN="RIGHT"
1207VALIGN="TOP"
1208><I
1209CLASS="EMPHASIS"
1210>Returns</I
1211> :</TD
1212><TD
1213WIDTH="80%"
1214ALIGN="LEFT"
1215VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001216>NULL if not found the original name otherwise</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001217></TR
1218></TABLE
1219><P
1220></P
1221></DIV
1222></DIV
1223><HR><DIV
1224CLASS="REFSECT2"
1225><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001226NAME="AEN17811"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001227></A
1228><H3
1229><A
1230NAME="XMLCLEANUPENCODINGALIASES"
1231></A
1232>xmlCleanupEncodingAliases ()</H3
1233><TABLE
1234BORDER="0"
1235BGCOLOR="#D6E8FF"
1236WIDTH="100%"
1237CELLPADDING="6"
1238><TR
1239><TD
1240><PRE
1241CLASS="PROGRAMLISTING"
1242>void xmlCleanupEncodingAliases (void);</PRE
1243></TD
1244></TR
1245></TABLE
1246><P
1247>Unregisters all aliases</P
1248><P
1249></P
1250></DIV
1251><HR><DIV
1252CLASS="REFSECT2"
1253><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001254NAME="AEN17817"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001255></A
1256><H3
1257><A
1258NAME="XMLPARSECHARENCODING"
1259></A
1260>xmlParseCharEncoding ()</H3
1261><TABLE
1262BORDER="0"
1263BGCOLOR="#D6E8FF"
1264WIDTH="100%"
1265CELLPADDING="6"
1266><TR
1267><TD
1268><PRE
1269CLASS="PROGRAMLISTING"
1270><A
1271HREF="gnome-xml-encoding.html#XMLCHARENCODING"
1272>xmlCharEncoding</A
1273> xmlParseCharEncoding (const char *name);</PRE
1274></TD
1275></TR
1276></TABLE
1277><P
1278>Conpare the string to the known encoding schemes already known. Note
1279that the comparison is case insensitive accordingly to the section
1280[XML] 4.3.3 Character Encoding in Entities.</P
1281><P
1282></P
1283><DIV
1284CLASS="INFORMALTABLE"
1285><P
1286></P
1287><TABLE
1288BORDER="0"
1289WIDTH="100%"
1290BGCOLOR="#FFD0D0"
1291CELLSPACING="0"
1292CELLPADDING="4"
1293CLASS="CALSTABLE"
1294><TR
1295><TD
1296WIDTH="20%"
1297ALIGN="RIGHT"
1298VALIGN="TOP"
1299><TT
1300CLASS="PARAMETER"
1301><I
1302>name</I
1303></TT
1304>&nbsp;:</TD
1305><TD
1306WIDTH="80%"
1307ALIGN="LEFT"
1308VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001309> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001310></TR
1311><TR
1312><TD
1313WIDTH="20%"
1314ALIGN="RIGHT"
1315VALIGN="TOP"
1316><I
1317CLASS="EMPHASIS"
1318>Returns</I
1319> :</TD
1320><TD
1321WIDTH="80%"
1322ALIGN="LEFT"
1323VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001324>one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE
1325if not recognized.</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001326></TR
1327></TABLE
1328><P
1329></P
1330></DIV
1331></DIV
1332><HR><DIV
1333CLASS="REFSECT2"
1334><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001335NAME="AEN17837"
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001336></A
1337><H3
1338><A
1339NAME="XMLGETCHARENCODINGNAME"
1340></A
1341>xmlGetCharEncodingName ()</H3
1342><TABLE
1343BORDER="0"
1344BGCOLOR="#D6E8FF"
1345WIDTH="100%"
1346CELLPADDING="6"
1347><TR
1348><TD
1349><PRE
1350CLASS="PROGRAMLISTING"
1351>const char* xmlGetCharEncodingName (<A
1352HREF="gnome-xml-encoding.html#XMLCHARENCODING"
1353>xmlCharEncoding</A
1354> enc);</PRE
1355></TD
1356></TR
1357></TABLE
1358><P
1359>The "canonical" name for XML encoding.
1360C.f. http://www.w3.org/TR/REC-xml<GTKDOCLINK
1361HREF="CHARENCODING"
1362>charencoding</GTKDOCLINK
1363>
1364Section 4.3.3 Character Encoding in Entities</P
1365><P
1366></P
1367><DIV
1368CLASS="INFORMALTABLE"
1369><P
1370></P
1371><TABLE
1372BORDER="0"
1373WIDTH="100%"
1374BGCOLOR="#FFD0D0"
1375CELLSPACING="0"
1376CELLPADDING="4"
1377CLASS="CALSTABLE"
1378><TR
1379><TD
1380WIDTH="20%"
1381ALIGN="RIGHT"
1382VALIGN="TOP"
1383><TT
1384CLASS="PARAMETER"
1385><I
1386>enc</I
1387></TT
1388>&nbsp;:</TD
1389><TD
1390WIDTH="80%"
1391ALIGN="LEFT"
1392VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001393> the encoding</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001394></TR
1395><TR
1396><TD
1397WIDTH="20%"
1398ALIGN="RIGHT"
1399VALIGN="TOP"
1400><I
1401CLASS="EMPHASIS"
1402>Returns</I
1403> :</TD
1404><TD
1405WIDTH="80%"
1406ALIGN="LEFT"
1407VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001408>the canonical name for the given encoding</TD
Daniel Veillard3bff2b02000-10-01 20:33:47 +00001409></TR
1410></TABLE
1411><P
1412></P
1413></DIV
1414></DIV
1415><HR><DIV
1416CLASS="REFSECT2"
1417><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001418NAME="AEN17858"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001419></A
1420><H3
1421><A
1422NAME="XMLDETECTCHARENCODING"
1423></A
1424>xmlDetectCharEncoding ()</H3
1425><TABLE
1426BORDER="0"
1427BGCOLOR="#D6E8FF"
1428WIDTH="100%"
1429CELLPADDING="6"
1430><TR
1431><TD
1432><PRE
1433CLASS="PROGRAMLISTING"
1434><A
1435HREF="gnome-xml-encoding.html#XMLCHARENCODING"
1436>xmlCharEncoding</A
1437> xmlDetectCharEncoding (unsigned char *in,
1438 int len);</PRE
1439></TD
1440></TR
1441></TABLE
1442><P
1443>Guess the encoding of the entity using the first bytes of the entity content
1444accordingly of the non-normative appendix F of the XML-1.0 recommendation.</P
1445><P
1446></P
1447><DIV
1448CLASS="INFORMALTABLE"
1449><P
1450></P
1451><TABLE
1452BORDER="0"
1453WIDTH="100%"
1454BGCOLOR="#FFD0D0"
1455CELLSPACING="0"
1456CELLPADDING="4"
1457CLASS="CALSTABLE"
1458><TR
1459><TD
1460WIDTH="20%"
1461ALIGN="RIGHT"
1462VALIGN="TOP"
1463><TT
1464CLASS="PARAMETER"
1465><I
1466>in</I
1467></TT
1468>&nbsp;:</TD
1469><TD
1470WIDTH="80%"
1471ALIGN="LEFT"
1472VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001473> a pointer to the first bytes of the XML entity, must be at least
14744 bytes long.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001475></TR
1476><TR
1477><TD
1478WIDTH="20%"
1479ALIGN="RIGHT"
1480VALIGN="TOP"
1481><TT
1482CLASS="PARAMETER"
1483><I
1484>len</I
1485></TT
1486>&nbsp;:</TD
1487><TD
1488WIDTH="80%"
1489ALIGN="LEFT"
1490VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001491> pointer to the length of the buffer</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001492></TR
1493><TR
1494><TD
1495WIDTH="20%"
1496ALIGN="RIGHT"
1497VALIGN="TOP"
1498><I
1499CLASS="EMPHASIS"
1500>Returns</I
1501> :</TD
1502><TD
1503WIDTH="80%"
1504ALIGN="LEFT"
1505VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001506>one of the XML_CHAR_ENCODING_... values.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001507></TR
1508></TABLE
1509><P
1510></P
1511></DIV
1512></DIV
1513><HR><DIV
1514CLASS="REFSECT2"
1515><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001516NAME="AEN17882"
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001517></A
1518><H3
1519><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001520NAME="XMLCHECKUTF8"
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001521></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001522>xmlCheckUTF8 ()</H3
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001523><TABLE
1524BORDER="0"
1525BGCOLOR="#D6E8FF"
1526WIDTH="100%"
1527CELLPADDING="6"
1528><TR
1529><TD
1530><PRE
1531CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001532>int xmlCheckUTF8 (unsigned char *utf);</PRE
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001533></TD
1534></TR
1535></TABLE
1536><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001537>Checks <TT
1538CLASS="PARAMETER"
1539><I
1540>utf</I
1541></TT
1542> for being valid utf-8. <TT
1543CLASS="PARAMETER"
1544><I
1545>utf</I
1546></TT
1547> is assumed to be
1548null-terminated. This function is not super-strict, as it will
1549allow longer utf-8 sequences than necessary. Note that Java is
1550capable of producing these sequences if provoked. Also note, this
1551routine checks for the 4-byte maxiumum size, but does not check for
15520x10ffff maximum value.</P
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001553><P
1554></P
1555><DIV
1556CLASS="INFORMALTABLE"
1557><P
1558></P
1559><TABLE
1560BORDER="0"
1561WIDTH="100%"
1562BGCOLOR="#FFD0D0"
1563CELLSPACING="0"
1564CELLPADDING="4"
1565CLASS="CALSTABLE"
1566><TR
1567><TD
1568WIDTH="20%"
1569ALIGN="RIGHT"
1570VALIGN="TOP"
1571><TT
1572CLASS="PARAMETER"
1573><I
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001574>utf</I
1575></TT
1576>&nbsp;:</TD
1577><TD
1578WIDTH="80%"
1579ALIGN="LEFT"
1580VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001581> Pointer to putative utf-8 encoded string.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001582></TR
1583><TR
1584><TD
1585WIDTH="20%"
1586ALIGN="RIGHT"
1587VALIGN="TOP"
1588><I
1589CLASS="EMPHASIS"
1590>Returns</I
1591> :</TD
1592><TD
1593WIDTH="80%"
1594ALIGN="LEFT"
1595VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001596> true if <TT
1597CLASS="PARAMETER"
1598><I
1599>utf</I
1600></TT
1601> is valid.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001602></TR
1603></TABLE
1604><P
1605></P
1606></DIV
1607></DIV
1608><HR><DIV
1609CLASS="REFSECT2"
1610><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001611NAME="AEN17904"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001612></A
1613><H3
1614><A
1615NAME="XMLCHARENCOUTFUNC"
1616></A
1617>xmlCharEncOutFunc ()</H3
1618><TABLE
1619BORDER="0"
1620BGCOLOR="#D6E8FF"
1621WIDTH="100%"
1622CELLPADDING="6"
1623><TR
1624><TD
1625><PRE
1626CLASS="PROGRAMLISTING"
1627>int xmlCharEncOutFunc (<A
1628HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
1629>xmlCharEncodingHandler</A
1630> *handler,
1631 <A
1632HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1633>xmlBufferPtr</A
1634> out,
1635 <A
1636HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1637>xmlBufferPtr</A
1638> in);</PRE
1639></TD
1640></TR
1641></TABLE
1642><P
1643>Generic front-end for the encoding handler output function
1644a first call with <TT
1645CLASS="PARAMETER"
1646><I
1647>in</I
1648></TT
1649> == NULL has to be made firs to initiate the
1650output in case of non-stateless encoding needing to initiate their
1651state or the output (like the BOM in UTF16).
1652In case of UTF8 sequence conversion errors for the given encoder,
1653the content will be automatically remapped to a CharRef sequence.</P
1654><P
1655></P
1656><DIV
1657CLASS="INFORMALTABLE"
1658><P
1659></P
1660><TABLE
1661BORDER="0"
1662WIDTH="100%"
1663BGCOLOR="#FFD0D0"
1664CELLSPACING="0"
1665CELLPADDING="4"
1666CLASS="CALSTABLE"
1667><TR
1668><TD
1669WIDTH="20%"
1670ALIGN="RIGHT"
1671VALIGN="TOP"
1672><TT
1673CLASS="PARAMETER"
1674><I
1675>handler</I
1676></TT
1677>&nbsp;:</TD
1678><TD
1679WIDTH="80%"
1680ALIGN="LEFT"
1681VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001682> char enconding transformation data structure</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>out</I
1693></TT
1694>&nbsp;:</TD
1695><TD
1696WIDTH="80%"
1697ALIGN="LEFT"
1698VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001699> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001700></TR
1701><TR
1702><TD
1703WIDTH="20%"
1704ALIGN="RIGHT"
1705VALIGN="TOP"
1706><TT
1707CLASS="PARAMETER"
1708><I
Daniel Veillard06047432000-04-24 11:33:38 +00001709>in</I
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001710></TT
1711>&nbsp;:</TD
1712><TD
1713WIDTH="80%"
1714ALIGN="LEFT"
1715VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001716> an xmlBuffer for the input</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001717></TR
1718><TR
1719><TD
1720WIDTH="20%"
1721ALIGN="RIGHT"
1722VALIGN="TOP"
1723><I
1724CLASS="EMPHASIS"
1725>Returns</I
1726> :</TD
1727><TD
1728WIDTH="80%"
1729ALIGN="LEFT"
1730VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001731>the number of byte written if success, or
1732-1 general error
1733-2 if the transcoding fails (for *in is not valid utf8 string or
1734the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001735></TR
1736></TABLE
1737><P
1738></P
1739></DIV
1740></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00001741><HR><DIV
1742CLASS="REFSECT2"
1743><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001744NAME="AEN17935"
Daniel Veillard06047432000-04-24 11:33:38 +00001745></A
1746><H3
1747><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001748NAME="XMLCHARENCINFUNC"
Daniel Veillard06047432000-04-24 11:33:38 +00001749></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001750>xmlCharEncInFunc ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001751><TABLE
1752BORDER="0"
1753BGCOLOR="#D6E8FF"
1754WIDTH="100%"
1755CELLPADDING="6"
1756><TR
1757><TD
1758><PRE
1759CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001760>int xmlCharEncInFunc (<A
1761HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
1762>xmlCharEncodingHandler</A
1763> *handler,
1764 <A
1765HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1766>xmlBufferPtr</A
1767> out,
1768 <A
1769HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1770>xmlBufferPtr</A
1771> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001772></TD
1773></TR
1774></TABLE
1775><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001776>Generic front-end for the encoding handler input function</P
Daniel Veillard06047432000-04-24 11:33:38 +00001777><P
1778></P
1779><DIV
1780CLASS="INFORMALTABLE"
1781><P
1782></P
1783><TABLE
1784BORDER="0"
1785WIDTH="100%"
1786BGCOLOR="#FFD0D0"
1787CELLSPACING="0"
1788CELLPADDING="4"
1789CLASS="CALSTABLE"
1790><TR
1791><TD
1792WIDTH="20%"
1793ALIGN="RIGHT"
1794VALIGN="TOP"
1795><TT
1796CLASS="PARAMETER"
1797><I
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001798>handler</I
Daniel Veillard06047432000-04-24 11:33:38 +00001799></TT
1800>&nbsp;:</TD
1801><TD
1802WIDTH="80%"
1803ALIGN="LEFT"
1804VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001805> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001806></TR
1807><TR
1808><TD
1809WIDTH="20%"
1810ALIGN="RIGHT"
1811VALIGN="TOP"
1812><TT
1813CLASS="PARAMETER"
1814><I
1815>out</I
1816></TT
1817>&nbsp;:</TD
1818><TD
1819WIDTH="80%"
1820ALIGN="LEFT"
1821VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001822> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001823></TR
1824><TR
1825><TD
1826WIDTH="20%"
1827ALIGN="RIGHT"
1828VALIGN="TOP"
1829><TT
1830CLASS="PARAMETER"
1831><I
1832>in</I
1833></TT
1834>&nbsp;:</TD
1835><TD
1836WIDTH="80%"
1837ALIGN="LEFT"
1838VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001839> an xmlBuffer for the input</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001840></TR
1841><TR
1842><TD
1843WIDTH="20%"
1844ALIGN="RIGHT"
1845VALIGN="TOP"
1846><I
1847CLASS="EMPHASIS"
1848>Returns</I
1849> :</TD
1850><TD
1851WIDTH="80%"
1852ALIGN="LEFT"
1853VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001854>the number of byte written if success, or
1855-1 general error
1856-2 if the transcoding fails (for *in is not valid utf8 string or
1857the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001858></TR
1859></TABLE
1860><P
1861></P
1862></DIV
1863></DIV
1864><HR><DIV
1865CLASS="REFSECT2"
1866><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001867NAME="AEN17965"
Daniel Veillard06047432000-04-24 11:33:38 +00001868></A
1869><H3
1870><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001871NAME="XMLCHARENCFIRSTLINE"
Daniel Veillard06047432000-04-24 11:33:38 +00001872></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001873>xmlCharEncFirstLine ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001874><TABLE
1875BORDER="0"
1876BGCOLOR="#D6E8FF"
1877WIDTH="100%"
1878CELLPADDING="6"
1879><TR
1880><TD
1881><PRE
1882CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001883>int xmlCharEncFirstLine (<A
1884HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
1885>xmlCharEncodingHandler</A
1886> *handler,
1887 <A
1888HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1889>xmlBufferPtr</A
1890> out,
1891 <A
1892HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1893>xmlBufferPtr</A
1894> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001895></TD
1896></TR
1897></TABLE
1898><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001899>Front-end for the encoding handler input function, but handle only
1900the very first line, i.e. limit itself to 45 chars.</P
Daniel Veillard06047432000-04-24 11:33:38 +00001901><P
1902></P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001903><DIV
1904CLASS="INFORMALTABLE"
1905><P
1906></P
1907><TABLE
1908BORDER="0"
1909WIDTH="100%"
1910BGCOLOR="#FFD0D0"
1911CELLSPACING="0"
1912CELLPADDING="4"
1913CLASS="CALSTABLE"
1914><TR
1915><TD
1916WIDTH="20%"
1917ALIGN="RIGHT"
1918VALIGN="TOP"
1919><TT
1920CLASS="PARAMETER"
1921><I
1922>handler</I
1923></TT
1924>&nbsp;:</TD
1925><TD
1926WIDTH="80%"
1927ALIGN="LEFT"
1928VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001929> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001930></TR
1931><TR
1932><TD
1933WIDTH="20%"
1934ALIGN="RIGHT"
1935VALIGN="TOP"
1936><TT
1937CLASS="PARAMETER"
1938><I
1939>out</I
1940></TT
1941>&nbsp;:</TD
1942><TD
1943WIDTH="80%"
1944ALIGN="LEFT"
1945VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001946> an xmlBuffer for the output.</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001947></TR
1948><TR
1949><TD
1950WIDTH="20%"
1951ALIGN="RIGHT"
1952VALIGN="TOP"
1953><TT
1954CLASS="PARAMETER"
1955><I
1956>in</I
1957></TT
1958>&nbsp;:</TD
1959><TD
1960WIDTH="80%"
1961ALIGN="LEFT"
1962VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001963> an xmlBuffer for the input</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001964></TR
1965><TR
1966><TD
1967WIDTH="20%"
1968ALIGN="RIGHT"
1969VALIGN="TOP"
1970><I
1971CLASS="EMPHASIS"
1972>Returns</I
1973> :</TD
1974><TD
1975WIDTH="80%"
1976ALIGN="LEFT"
1977VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001978>the number of byte written if success, or
1979-1 general error
1980-2 if the transcoding fails (for *in is not valid utf8 string or
1981the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001982></TR
1983></TABLE
1984><P
1985></P
1986></DIV
1987></DIV
1988><HR><DIV
1989CLASS="REFSECT2"
1990><A
Daniel Veillarda1fe9102000-11-25 10:49:25 +00001991NAME="AEN17995"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001992></A
1993><H3
1994><A
1995NAME="XMLCHARENCCLOSEFUNC"
1996></A
1997>xmlCharEncCloseFunc ()</H3
1998><TABLE
1999BORDER="0"
2000BGCOLOR="#D6E8FF"
2001WIDTH="100%"
2002CELLPADDING="6"
2003><TR
2004><TD
2005><PRE
2006CLASS="PROGRAMLISTING"
2007>int xmlCharEncCloseFunc (<A
2008HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
2009>xmlCharEncodingHandler</A
2010> *handler);</PRE
2011></TD
2012></TR
2013></TABLE
2014><P
2015>Generic front-end for hencoding handler close function</P
2016><P
2017></P
2018><DIV
2019CLASS="INFORMALTABLE"
2020><P
2021></P
2022><TABLE
2023BORDER="0"
2024WIDTH="100%"
2025BGCOLOR="#FFD0D0"
2026CELLSPACING="0"
2027CELLPADDING="4"
2028CLASS="CALSTABLE"
2029><TR
2030><TD
2031WIDTH="20%"
2032ALIGN="RIGHT"
2033VALIGN="TOP"
2034><TT
2035CLASS="PARAMETER"
2036><I
2037>handler</I
2038></TT
2039>&nbsp;:</TD
2040><TD
2041WIDTH="80%"
2042ALIGN="LEFT"
2043VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002044> char enconding transformation data structure</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002045></TR
2046><TR
2047><TD
2048WIDTH="20%"
2049ALIGN="RIGHT"
2050VALIGN="TOP"
2051><I
2052CLASS="EMPHASIS"
2053>Returns</I
2054> :</TD
2055><TD
2056WIDTH="80%"
2057ALIGN="LEFT"
2058VALIGN="TOP"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00002059>0 if success, or -1 in case of error</TD
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00002060></TR
2061></TABLE
2062><P
2063></P
2064></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00002065></DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +00002066></DIV
2067><DIV
2068CLASS="NAVFOOTER"
2069><BR
2070CLEAR="all"><BR><TABLE
2071WIDTH="100%"
2072BORDER="0"
2073BGCOLOR="#000000"
2074CELLPADDING="1"
2075CELLSPACING="0"
2076><TR
2077><TD
2078WIDTH="25%"
2079BGCOLOR="#C00000"
2080ALIGN="left"
2081><A
2082HREF="gnome-xml-parserinternals.html"
2083><FONT
2084COLOR="#FFFFFF"
2085SIZE="3"
2086><B
2087>&#60;&#60;&#60; Previous Page</B
2088></FONT
2089></A
2090></TD
2091><TD
2092WIDTH="25%"
2093BGCOLOR="#0000C0"
2094ALIGN="center"
2095><FONT
2096COLOR="#FFFFFF"
2097SIZE="3"
2098><B
2099><A
2100HREF="book1.html"
2101><FONT
2102COLOR="#FFFFFF"
2103SIZE="3"
2104><B
2105>Home</B
2106></FONT
2107></A
2108></B
2109></FONT
2110></TD
2111><TD
2112WIDTH="25%"
2113BGCOLOR="#00C000"
2114ALIGN="center"
2115><FONT
2116COLOR="#FFFFFF"
2117SIZE="3"
2118><B
2119><A
2120HREF="libxml-lib.html"
2121><FONT
2122COLOR="#FFFFFF"
2123SIZE="3"
2124><B
2125>Up</B
2126></FONT
2127></A
2128></B
2129></FONT
2130></TD
2131><TD
2132WIDTH="25%"
2133BGCOLOR="#C00000"
2134ALIGN="right"
2135><A
2136HREF="gnome-xml-debugxml.html"
2137><FONT
2138COLOR="#FFFFFF"
2139SIZE="3"
2140><B
2141>Next Page &#62;&#62;&#62;</B
2142></FONT
2143></A
2144></TD
2145></TR
2146><TR
2147><TD
2148COLSPAN="2"
2149ALIGN="left"
2150><FONT
2151COLOR="#FFFFFF"
2152SIZE="3"
2153><B
2154>parserInternals</B
2155></FONT
2156></TD
2157><TD
2158COLSPAN="2"
2159ALIGN="right"
2160><FONT
2161COLOR="#FFFFFF"
2162SIZE="3"
2163><B
2164>debugXML</B
2165></FONT
2166></TD
2167></TR
2168></TABLE
2169></DIV
2170></BODY
2171></HTML
2172>