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