blob: 2591484c69ced09cfc6f0d83fbe16b4feeec2d5b [file] [log] [blame]
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001<HTML
2><HEAD
3><TITLE
4>encoding</TITLE
5><META
6NAME="GENERATOR"
7CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK
8REL="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
114>encoding</H1
115><DIV
116CLASS="REFNAMEDIV"
117><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000118NAME="AEN12758"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000119></A
120><H2
121>Name</H2
122>encoding &#8212; </DIV
123><DIV
124CLASS="REFSYNOPSISDIV"
125><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000126NAME="AEN12761"
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,
149 int outlen,
150 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,
156 int outlen,
157 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000158 int *inlen);
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000159struct <A
160HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
161>xmlCharEncodingHandler</A
162>;
163typedef <A
164HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
165>xmlCharEncodingHandlerPtr</A
166>;
167void <A
168HREF="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
176HREF="gnome-xml-encoding.html#XMLREGISTERCHARENCODINGHANDLER"
177>xmlRegisterCharEncodingHandler</A
178> (<A
179HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
180>xmlCharEncodingHandlerPtr</A
181> handler);
182<A
183HREF="gnome-xml-encoding.html#XMLCHARENCODING"
184>xmlCharEncoding</A
185> <A
186HREF="gnome-xml-encoding.html#XMLDETECTCHARENCODING"
187>xmlDetectCharEncoding</A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000188> (unsigned char *in,
189 int len);
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000190<A
191HREF="gnome-xml-encoding.html#XMLCHARENCODING"
192>xmlCharEncoding</A
193> <A
194HREF="gnome-xml-encoding.html#XMLPARSECHARENCODING"
195>xmlParseCharEncoding</A
196> (const char *name);
197<A
198HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
199>xmlCharEncodingHandlerPtr</A
200> <A
201HREF="gnome-xml-encoding.html#XMLGETCHARENCODINGHANDLER"
202>xmlGetCharEncodingHandler</A
203>
204 (<A
205HREF="gnome-xml-encoding.html#XMLCHARENCODING"
206>xmlCharEncoding</A
207> enc);
208<A
209HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
210>xmlCharEncodingHandlerPtr</A
211> <A
212HREF="gnome-xml-encoding.html#XMLFINDCHARENCODINGHANDLER"
213>xmlFindCharEncodingHandler</A
214>
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000215 (const char *name);
216int <A
217HREF="gnome-xml-encoding.html#XMLCHECKUTF8"
218>xmlCheckUTF8</A
219> (unsigned char *utf);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000220></TD
221></TR
222></TABLE
223></DIV
224><DIV
225CLASS="REFSECT1"
226><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000227NAME="AEN12783"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000228></A
229><H2
230>Description</H2
231><P
232></P
233></DIV
234><DIV
235CLASS="REFSECT1"
236><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000237NAME="AEN12786"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000238></A
239><H2
240>Details</H2
241><DIV
242CLASS="REFSECT2"
243><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000244NAME="AEN12788"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000245></A
246><H3
247><A
248NAME="XMLCHARENCODING"
249></A
250>enum xmlCharEncoding</H3
251><TABLE
252BORDER="0"
253BGCOLOR="#D6E8FF"
254WIDTH="100%"
255CELLPADDING="6"
256><TR
257><TD
258><PRE
259CLASS="PROGRAMLISTING"
260>typedef enum {
261 XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
262 XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
263 XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
264 XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
265 XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
266 XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
267 XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
268 XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
269 XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
270 XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
271 XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
272 XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
273 XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
274 XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
275 XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
276 XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
277 XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
278 XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
279 XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
280 XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
281 XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
282 XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
283 XML_CHAR_ENCODING_EUC_JP= 21 /* EUC-JP */
284} xmlCharEncoding;</PRE
285></TD
286></TR
287></TABLE
288><P
289></P
290></DIV
291><HR><DIV
292CLASS="REFSECT2"
293><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000294NAME="AEN12793"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000295></A
296><H3
297><A
298NAME="XMLCHARENCODINGINPUTFUNC"
299></A
300>xmlCharEncodingInputFunc ()</H3
301><TABLE
302BORDER="0"
303BGCOLOR="#D6E8FF"
304WIDTH="100%"
305CELLPADDING="6"
306><TR
307><TD
308><PRE
309CLASS="PROGRAMLISTING"
310>int (*xmlCharEncodingInputFunc) (unsigned char *out,
311 int outlen,
312 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000313 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000314></TD
315></TR
316></TABLE
317><P
318></P
319><DIV
320CLASS="INFORMALTABLE"
321><P
322></P
323><TABLE
324BORDER="0"
325WIDTH="100%"
326BGCOLOR="#FFD0D0"
327CELLSPACING="0"
328CELLPADDING="4"
329CLASS="CALSTABLE"
330><TR
331><TD
332WIDTH="20%"
333ALIGN="RIGHT"
334VALIGN="TOP"
335><TT
336CLASS="PARAMETER"
337><I
338>out</I
339></TT
340>&nbsp;:</TD
341><TD
342WIDTH="80%"
343ALIGN="LEFT"
344VALIGN="TOP"
345>&nbsp;</TD
346></TR
347><TR
348><TD
349WIDTH="20%"
350ALIGN="RIGHT"
351VALIGN="TOP"
352><TT
353CLASS="PARAMETER"
354><I
355>outlen</I
356></TT
357>&nbsp;:</TD
358><TD
359WIDTH="80%"
360ALIGN="LEFT"
361VALIGN="TOP"
362>&nbsp;</TD
363></TR
364><TR
365><TD
366WIDTH="20%"
367ALIGN="RIGHT"
368VALIGN="TOP"
369><TT
370CLASS="PARAMETER"
371><I
372>in</I
373></TT
374>&nbsp;:</TD
375><TD
376WIDTH="80%"
377ALIGN="LEFT"
378VALIGN="TOP"
379>&nbsp;</TD
380></TR
381><TR
382><TD
383WIDTH="20%"
384ALIGN="RIGHT"
385VALIGN="TOP"
386><TT
387CLASS="PARAMETER"
388><I
389>inlen</I
390></TT
391>&nbsp;:</TD
392><TD
393WIDTH="80%"
394ALIGN="LEFT"
395VALIGN="TOP"
396>&nbsp;</TD
397></TR
398><TR
399><TD
400WIDTH="20%"
401ALIGN="RIGHT"
402VALIGN="TOP"
403><I
404CLASS="EMPHASIS"
405>Returns</I
406> :</TD
407><TD
408WIDTH="80%"
409ALIGN="LEFT"
410VALIGN="TOP"
411>&nbsp;</TD
412></TR
413></TABLE
414><P
415></P
416></DIV
417></DIV
418><HR><DIV
419CLASS="REFSECT2"
420><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000421NAME="AEN12823"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000422></A
423><H3
424><A
425NAME="XMLCHARENCODINGOUTPUTFUNC"
426></A
427>xmlCharEncodingOutputFunc ()</H3
428><TABLE
429BORDER="0"
430BGCOLOR="#D6E8FF"
431WIDTH="100%"
432CELLPADDING="6"
433><TR
434><TD
435><PRE
436CLASS="PROGRAMLISTING"
437>int (*xmlCharEncodingOutputFunc) (unsigned char *out,
438 int outlen,
439 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000440 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000441></TD
442></TR
443></TABLE
444><P
445></P
446><DIV
447CLASS="INFORMALTABLE"
448><P
449></P
450><TABLE
451BORDER="0"
452WIDTH="100%"
453BGCOLOR="#FFD0D0"
454CELLSPACING="0"
455CELLPADDING="4"
456CLASS="CALSTABLE"
457><TR
458><TD
459WIDTH="20%"
460ALIGN="RIGHT"
461VALIGN="TOP"
462><TT
463CLASS="PARAMETER"
464><I
465>out</I
466></TT
467>&nbsp;:</TD
468><TD
469WIDTH="80%"
470ALIGN="LEFT"
471VALIGN="TOP"
472>&nbsp;</TD
473></TR
474><TR
475><TD
476WIDTH="20%"
477ALIGN="RIGHT"
478VALIGN="TOP"
479><TT
480CLASS="PARAMETER"
481><I
482>outlen</I
483></TT
484>&nbsp;:</TD
485><TD
486WIDTH="80%"
487ALIGN="LEFT"
488VALIGN="TOP"
489>&nbsp;</TD
490></TR
491><TR
492><TD
493WIDTH="20%"
494ALIGN="RIGHT"
495VALIGN="TOP"
496><TT
497CLASS="PARAMETER"
498><I
499>in</I
500></TT
501>&nbsp;:</TD
502><TD
503WIDTH="80%"
504ALIGN="LEFT"
505VALIGN="TOP"
506>&nbsp;</TD
507></TR
508><TR
509><TD
510WIDTH="20%"
511ALIGN="RIGHT"
512VALIGN="TOP"
513><TT
514CLASS="PARAMETER"
515><I
516>inlen</I
517></TT
518>&nbsp;:</TD
519><TD
520WIDTH="80%"
521ALIGN="LEFT"
522VALIGN="TOP"
523>&nbsp;</TD
524></TR
525><TR
526><TD
527WIDTH="20%"
528ALIGN="RIGHT"
529VALIGN="TOP"
530><I
531CLASS="EMPHASIS"
532>Returns</I
533> :</TD
534><TD
535WIDTH="80%"
536ALIGN="LEFT"
537VALIGN="TOP"
538>&nbsp;</TD
539></TR
540></TABLE
541><P
542></P
543></DIV
544></DIV
545><HR><DIV
546CLASS="REFSECT2"
547><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000548NAME="AEN12853"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000549></A
550><H3
551><A
552NAME="XMLCHARENCODINGHANDLER"
553></A
554>struct xmlCharEncodingHandler</H3
555><TABLE
556BORDER="0"
557BGCOLOR="#D6E8FF"
558WIDTH="100%"
559CELLPADDING="6"
560><TR
561><TD
562><PRE
563CLASS="PROGRAMLISTING"
564>struct xmlCharEncodingHandler {
565 char *name;
566 xmlCharEncodingInputFunc input;
567 xmlCharEncodingOutputFunc output;
568};</PRE
569></TD
570></TR
571></TABLE
572><P
573></P
574></DIV
575><HR><DIV
576CLASS="REFSECT2"
577><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000578NAME="AEN12858"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000579></A
580><H3
581><A
582NAME="XMLCHARENCODINGHANDLERPTR"
583></A
584>xmlCharEncodingHandlerPtr</H3
585><TABLE
586BORDER="0"
587BGCOLOR="#D6E8FF"
588WIDTH="100%"
589CELLPADDING="6"
590><TR
591><TD
592><PRE
593CLASS="PROGRAMLISTING"
594>typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;</PRE
595></TD
596></TR
597></TABLE
598><P
599></P
600></DIV
601><HR><DIV
602CLASS="REFSECT2"
603><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000604NAME="AEN12863"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000605></A
606><H3
607><A
608NAME="XMLINITCHARENCODINGHANDLERS"
609></A
610>xmlInitCharEncodingHandlers ()</H3
611><TABLE
612BORDER="0"
613BGCOLOR="#D6E8FF"
614WIDTH="100%"
615CELLPADDING="6"
616><TR
617><TD
618><PRE
619CLASS="PROGRAMLISTING"
620>void xmlInitCharEncodingHandlers (void);</PRE
621></TD
622></TR
623></TABLE
624><P
625>Initialize the char encoding support, it registers the default
626encoding supported.
627NOTE: while public, this function usually doesn't need to be called
628in normal processing.</P
629><P
630></P
631></DIV
632><HR><DIV
633CLASS="REFSECT2"
634><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000635NAME="AEN12869"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000636></A
637><H3
638><A
639NAME="XMLCLEANUPCHARENCODINGHANDLERS"
640></A
641>xmlCleanupCharEncodingHandlers ()</H3
642><TABLE
643BORDER="0"
644BGCOLOR="#D6E8FF"
645WIDTH="100%"
646CELLPADDING="6"
647><TR
648><TD
649><PRE
650CLASS="PROGRAMLISTING"
651>void xmlCleanupCharEncodingHandlers (void);</PRE
652></TD
653></TR
654></TABLE
655><P
656>Cleanup the memory allocated for the char encoding support, it
657unregisters all the encoding handlers.</P
658><P
659></P
660></DIV
661><HR><DIV
662CLASS="REFSECT2"
663><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000664NAME="AEN12875"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000665></A
666><H3
667><A
668NAME="XMLREGISTERCHARENCODINGHANDLER"
669></A
670>xmlRegisterCharEncodingHandler ()</H3
671><TABLE
672BORDER="0"
673BGCOLOR="#D6E8FF"
674WIDTH="100%"
675CELLPADDING="6"
676><TR
677><TD
678><PRE
679CLASS="PROGRAMLISTING"
680>void xmlRegisterCharEncodingHandler (<A
681HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
682>xmlCharEncodingHandlerPtr</A
683> handler);</PRE
684></TD
685></TR
686></TABLE
687><P
688>Register the char encoding handler, surprizing, isn't it ?</P
689><P
690></P
691><DIV
692CLASS="INFORMALTABLE"
693><P
694></P
695><TABLE
696BORDER="0"
697WIDTH="100%"
698BGCOLOR="#FFD0D0"
699CELLSPACING="0"
700CELLPADDING="4"
701CLASS="CALSTABLE"
702><TR
703><TD
704WIDTH="20%"
705ALIGN="RIGHT"
706VALIGN="TOP"
707><TT
708CLASS="PARAMETER"
709><I
710>handler</I
711></TT
712>&nbsp;:</TD
713><TD
714WIDTH="80%"
715ALIGN="LEFT"
716VALIGN="TOP"
717> the xmlCharEncodingHandlerPtr handler block</TD
718></TR
719></TABLE
720><P
721></P
722></DIV
723></DIV
724><HR><DIV
725CLASS="REFSECT2"
726><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000727NAME="AEN12891"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000728></A
729><H3
730><A
731NAME="XMLDETECTCHARENCODING"
732></A
733>xmlDetectCharEncoding ()</H3
734><TABLE
735BORDER="0"
736BGCOLOR="#D6E8FF"
737WIDTH="100%"
738CELLPADDING="6"
739><TR
740><TD
741><PRE
742CLASS="PROGRAMLISTING"
743><A
744HREF="gnome-xml-encoding.html#XMLCHARENCODING"
745>xmlCharEncoding</A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000746> xmlDetectCharEncoding (unsigned char *in,
747 int len);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000748></TD
749></TR
750></TABLE
751><P
752>Guess the encoding of the entity using the first bytes of the entity content
753accordingly of the non-normative appendix F of the XML-1.0 recommendation.</P
754><P
755></P
756><DIV
757CLASS="INFORMALTABLE"
758><P
759></P
760><TABLE
761BORDER="0"
762WIDTH="100%"
763BGCOLOR="#FFD0D0"
764CELLSPACING="0"
765CELLPADDING="4"
766CLASS="CALSTABLE"
767><TR
768><TD
769WIDTH="20%"
770ALIGN="RIGHT"
771VALIGN="TOP"
772><TT
773CLASS="PARAMETER"
774><I
775>in</I
776></TT
777>&nbsp;:</TD
778><TD
779WIDTH="80%"
780ALIGN="LEFT"
781VALIGN="TOP"
782> a pointer to the first bytes of the XML entity, must be at least
7834 bytes long.</TD
784></TR
785><TR
786><TD
787WIDTH="20%"
788ALIGN="RIGHT"
789VALIGN="TOP"
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000790><TT
791CLASS="PARAMETER"
792><I
793>len</I
794></TT
795>&nbsp;:</TD
796><TD
797WIDTH="80%"
798ALIGN="LEFT"
799VALIGN="TOP"
800> pointer to the length of the buffer</TD
801></TR
802><TR
803><TD
804WIDTH="20%"
805ALIGN="RIGHT"
806VALIGN="TOP"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000807><I
808CLASS="EMPHASIS"
809>Returns</I
810> :</TD
811><TD
812WIDTH="80%"
813ALIGN="LEFT"
814VALIGN="TOP"
815>one of the XML_CHAR_ENCODING_... values.</TD
816></TR
817></TABLE
818><P
819></P
820></DIV
821></DIV
822><HR><DIV
823CLASS="REFSECT2"
824><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000825NAME="AEN12915"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000826></A
827><H3
828><A
829NAME="XMLPARSECHARENCODING"
830></A
831>xmlParseCharEncoding ()</H3
832><TABLE
833BORDER="0"
834BGCOLOR="#D6E8FF"
835WIDTH="100%"
836CELLPADDING="6"
837><TR
838><TD
839><PRE
840CLASS="PROGRAMLISTING"
841><A
842HREF="gnome-xml-encoding.html#XMLCHARENCODING"
843>xmlCharEncoding</A
844> xmlParseCharEncoding (const char *name);</PRE
845></TD
846></TR
847></TABLE
848><P
849>Conpare the string to the known encoding schemes already known. Note
850that the comparison is case insensitive accordingly to the section
851[XML] 4.3.3 Character Encoding in Entities.</P
852><P
853></P
854><DIV
855CLASS="INFORMALTABLE"
856><P
857></P
858><TABLE
859BORDER="0"
860WIDTH="100%"
861BGCOLOR="#FFD0D0"
862CELLSPACING="0"
863CELLPADDING="4"
864CLASS="CALSTABLE"
865><TR
866><TD
867WIDTH="20%"
868ALIGN="RIGHT"
869VALIGN="TOP"
870><TT
871CLASS="PARAMETER"
872><I
873>name</I
874></TT
875>&nbsp;:</TD
876><TD
877WIDTH="80%"
878ALIGN="LEFT"
879VALIGN="TOP"
880> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
881></TR
882><TR
883><TD
884WIDTH="20%"
885ALIGN="RIGHT"
886VALIGN="TOP"
887><I
888CLASS="EMPHASIS"
889>Returns</I
890> :</TD
891><TD
892WIDTH="80%"
893ALIGN="LEFT"
894VALIGN="TOP"
895>one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE
896if not recognized.</TD
897></TR
898></TABLE
899><P
900></P
901></DIV
902></DIV
903><HR><DIV
904CLASS="REFSECT2"
905><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000906NAME="AEN12935"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000907></A
908><H3
909><A
910NAME="XMLGETCHARENCODINGHANDLER"
911></A
912>xmlGetCharEncodingHandler ()</H3
913><TABLE
914BORDER="0"
915BGCOLOR="#D6E8FF"
916WIDTH="100%"
917CELLPADDING="6"
918><TR
919><TD
920><PRE
921CLASS="PROGRAMLISTING"
922><A
923HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
924>xmlCharEncodingHandlerPtr</A
925> xmlGetCharEncodingHandler
926 (<A
927HREF="gnome-xml-encoding.html#XMLCHARENCODING"
928>xmlCharEncoding</A
929> enc);</PRE
930></TD
931></TR
932></TABLE
933><P
934>Search in the registrered set the handler able to read/write that encoding.</P
935><P
936></P
937><DIV
938CLASS="INFORMALTABLE"
939><P
940></P
941><TABLE
942BORDER="0"
943WIDTH="100%"
944BGCOLOR="#FFD0D0"
945CELLSPACING="0"
946CELLPADDING="4"
947CLASS="CALSTABLE"
948><TR
949><TD
950WIDTH="20%"
951ALIGN="RIGHT"
952VALIGN="TOP"
953><TT
954CLASS="PARAMETER"
955><I
956>enc</I
957></TT
958>&nbsp;:</TD
959><TD
960WIDTH="80%"
961ALIGN="LEFT"
962VALIGN="TOP"
963> a string describing the char encoding.</TD
964></TR
965><TR
966><TD
967WIDTH="20%"
968ALIGN="RIGHT"
969VALIGN="TOP"
970><I
971CLASS="EMPHASIS"
972>Returns</I
973> :</TD
974><TD
975WIDTH="80%"
976ALIGN="LEFT"
977VALIGN="TOP"
978>the handler or NULL if not found</TD
979></TR
980></TABLE
981><P
982></P
983></DIV
984></DIV
985><HR><DIV
986CLASS="REFSECT2"
987><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000988NAME="AEN12956"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000989></A
990><H3
991><A
992NAME="XMLFINDCHARENCODINGHANDLER"
993></A
994>xmlFindCharEncodingHandler ()</H3
995><TABLE
996BORDER="0"
997BGCOLOR="#D6E8FF"
998WIDTH="100%"
999CELLPADDING="6"
1000><TR
1001><TD
1002><PRE
1003CLASS="PROGRAMLISTING"
1004><A
1005HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
1006>xmlCharEncodingHandlerPtr</A
1007> xmlFindCharEncodingHandler
1008 (const char *name);</PRE
1009></TD
1010></TR
1011></TABLE
1012><P
1013></P
1014><DIV
1015CLASS="INFORMALTABLE"
1016><P
1017></P
1018><TABLE
1019BORDER="0"
1020WIDTH="100%"
1021BGCOLOR="#FFD0D0"
1022CELLSPACING="0"
1023CELLPADDING="4"
1024CLASS="CALSTABLE"
1025><TR
1026><TD
1027WIDTH="20%"
1028ALIGN="RIGHT"
1029VALIGN="TOP"
1030><TT
1031CLASS="PARAMETER"
1032><I
1033>name</I
1034></TT
1035>&nbsp;:</TD
1036><TD
1037WIDTH="80%"
1038ALIGN="LEFT"
1039VALIGN="TOP"
1040>&nbsp;</TD
1041></TR
1042><TR
1043><TD
1044WIDTH="20%"
1045ALIGN="RIGHT"
1046VALIGN="TOP"
1047><I
1048CLASS="EMPHASIS"
1049>Returns</I
1050> :</TD
1051><TD
1052WIDTH="80%"
1053ALIGN="LEFT"
1054VALIGN="TOP"
1055>&nbsp;</TD
1056></TR
1057></TABLE
1058><P
1059></P
1060></DIV
1061></DIV
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001062><HR><DIV
1063CLASS="REFSECT2"
1064><A
1065NAME="AEN12975"
1066></A
1067><H3
1068><A
1069NAME="XMLCHECKUTF8"
1070></A
1071>xmlCheckUTF8 ()</H3
1072><TABLE
1073BORDER="0"
1074BGCOLOR="#D6E8FF"
1075WIDTH="100%"
1076CELLPADDING="6"
1077><TR
1078><TD
1079><PRE
1080CLASS="PROGRAMLISTING"
1081>int xmlCheckUTF8 (unsigned char *utf);</PRE
1082></TD
1083></TR
1084></TABLE
1085><P
1086>Checks <TT
1087CLASS="PARAMETER"
1088><I
1089>utf</I
1090></TT
1091> for being valid utf-8. <TT
1092CLASS="PARAMETER"
1093><I
1094>utf</I
1095></TT
1096> is assumed to be
1097null-terminated. This function is not super-strict, as it will
1098allow longer utf-8 sequences than necessary. Note that Java is
1099capable of producing these sequences if provoked. Also note, this
1100routine checks for the 4-byte maxiumum size, but does not check for
11010x10ffff maximum value.</P
1102><P
1103></P
1104><DIV
1105CLASS="INFORMALTABLE"
1106><P
1107></P
1108><TABLE
1109BORDER="0"
1110WIDTH="100%"
1111BGCOLOR="#FFD0D0"
1112CELLSPACING="0"
1113CELLPADDING="4"
1114CLASS="CALSTABLE"
1115><TR
1116><TD
1117WIDTH="20%"
1118ALIGN="RIGHT"
1119VALIGN="TOP"
1120><TT
1121CLASS="PARAMETER"
1122><I
1123>utf</I
1124></TT
1125>&nbsp;:</TD
1126><TD
1127WIDTH="80%"
1128ALIGN="LEFT"
1129VALIGN="TOP"
1130> Pointer to putative utf-8 encoded string.</TD
1131></TR
1132><TR
1133><TD
1134WIDTH="20%"
1135ALIGN="RIGHT"
1136VALIGN="TOP"
1137><I
1138CLASS="EMPHASIS"
1139>Returns</I
1140> :</TD
1141><TD
1142WIDTH="80%"
1143ALIGN="LEFT"
1144VALIGN="TOP"
1145> true if <TT
1146CLASS="PARAMETER"
1147><I
1148>utf</I
1149></TT
1150> is valid.</TD
1151></TR
1152></TABLE
1153><P
1154></P
1155></DIV
1156></DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001157></DIV
1158><DIV
1159CLASS="NAVFOOTER"
1160><BR
1161CLEAR="all"><BR><TABLE
1162WIDTH="100%"
1163BORDER="0"
1164BGCOLOR="#000000"
1165CELLPADDING="1"
1166CELLSPACING="0"
1167><TR
1168><TD
1169WIDTH="25%"
1170BGCOLOR="#C00000"
1171ALIGN="left"
1172><A
1173HREF="gnome-xml-parserinternals.html"
1174><FONT
1175COLOR="#FFFFFF"
1176SIZE="3"
1177><B
1178>&#60;&#60;&#60; Previous Page</B
1179></FONT
1180></A
1181></TD
1182><TD
1183WIDTH="25%"
1184BGCOLOR="#0000C0"
1185ALIGN="center"
1186><FONT
1187COLOR="#FFFFFF"
1188SIZE="3"
1189><B
1190><A
1191HREF="book1.html"
1192><FONT
1193COLOR="#FFFFFF"
1194SIZE="3"
1195><B
1196>Home</B
1197></FONT
1198></A
1199></B
1200></FONT
1201></TD
1202><TD
1203WIDTH="25%"
1204BGCOLOR="#00C000"
1205ALIGN="center"
1206><FONT
1207COLOR="#FFFFFF"
1208SIZE="3"
1209><B
1210><A
1211HREF="libxml-lib.html"
1212><FONT
1213COLOR="#FFFFFF"
1214SIZE="3"
1215><B
1216>Up</B
1217></FONT
1218></A
1219></B
1220></FONT
1221></TD
1222><TD
1223WIDTH="25%"
1224BGCOLOR="#C00000"
1225ALIGN="right"
1226><A
1227HREF="gnome-xml-debugxml.html"
1228><FONT
1229COLOR="#FFFFFF"
1230SIZE="3"
1231><B
1232>Next Page &#62;&#62;&#62;</B
1233></FONT
1234></A
1235></TD
1236></TR
1237><TR
1238><TD
1239COLSPAN="2"
1240ALIGN="left"
1241><FONT
1242COLOR="#FFFFFF"
1243SIZE="3"
1244><B
1245>parserInternals</B
1246></FONT
1247></TD
1248><TD
1249COLSPAN="2"
1250ALIGN="right"
1251><FONT
1252COLOR="#FFFFFF"
1253SIZE="3"
1254><B
1255>debugXML</B
1256></FONT
1257></TD
1258></TR
1259></TABLE
1260></DIV
1261></BODY
1262></HTML
1263>