blob: 8634dd65a75b8ef5859606288d5def0620b04024 [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 Veillard3f6f7f62000-06-30 17:58:25 +0000118NAME="AEN13874"
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 Veillard3f6f7f62000-06-30 17:58:25 +0000126NAME="AEN13877"
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 Veillard3f6f7f62000-06-30 17:58:25 +0000183HREF="gnome-xml-encoding.html#XMLCHARENCODING"
184>xmlCharEncoding</A
185> <A
186HREF="gnome-xml-encoding.html#XMLDETECTCHARENCODING"
187>xmlDetectCharEncoding</A
188> (unsigned char *in,
189 int len);
190<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);
197const char* <A
198HREF="gnome-xml-encoding.html#XMLGETCHARENCODINGNAME"
199>xmlGetCharEncodingName</A
200> (<A
201HREF="gnome-xml-encoding.html#XMLCHARENCODING"
202>xmlCharEncoding</A
203> enc);
204<A
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000205HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
206>xmlCharEncodingHandlerPtr</A
207> <A
208HREF="gnome-xml-encoding.html#XMLGETCHARENCODINGHANDLER"
209>xmlGetCharEncodingHandler</A
210>
211 (<A
212HREF="gnome-xml-encoding.html#XMLCHARENCODING"
213>xmlCharEncoding</A
214> enc);
215<A
216HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
217>xmlCharEncodingHandlerPtr</A
218> <A
219HREF="gnome-xml-encoding.html#XMLFINDCHARENCODINGHANDLER"
220>xmlFindCharEncodingHandler</A
221>
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000222 (const char *name);
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000223int <A
224HREF="gnome-xml-encoding.html#XMLCHECKUTF8"
225>xmlCheckUTF8</A
226> (unsigned char *utf);
227int <A
228HREF="gnome-xml-encoding.html#XMLCHARENCOUTFUNC"
229>xmlCharEncOutFunc</A
230> (<A
231HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
232>xmlCharEncodingHandler</A
233> *handler,
234 <A
235HREF="gnome-xml-tree.html#XMLBUFFERPTR"
236>xmlBufferPtr</A
237> out,
238 <A
239HREF="gnome-xml-tree.html#XMLBUFFERPTR"
240>xmlBufferPtr</A
241> in);
242int <A
243HREF="gnome-xml-encoding.html#XMLCHARENCINFUNC"
244>xmlCharEncInFunc</A
245> (<A
246HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
247>xmlCharEncodingHandler</A
248> *handler,
249 <A
250HREF="gnome-xml-tree.html#XMLBUFFERPTR"
251>xmlBufferPtr</A
252> out,
253 <A
254HREF="gnome-xml-tree.html#XMLBUFFERPTR"
255>xmlBufferPtr</A
256> in);
257int <A
258HREF="gnome-xml-encoding.html#XMLCHARENCFIRSTLINE"
259>xmlCharEncFirstLine</A
260> (<A
261HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
262>xmlCharEncodingHandler</A
263> *handler,
264 <A
265HREF="gnome-xml-tree.html#XMLBUFFERPTR"
266>xmlBufferPtr</A
267> out,
268 <A
269HREF="gnome-xml-tree.html#XMLBUFFERPTR"
270>xmlBufferPtr</A
271> in);
272int <A
273HREF="gnome-xml-encoding.html#XMLCHARENCCLOSEFUNC"
274>xmlCharEncCloseFunc</A
275> (<A
276HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
277>xmlCharEncodingHandler</A
278> *handler);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000279></TD
280></TR
281></TABLE
282></DIV
283><DIV
284CLASS="REFSECT1"
285><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000286NAME="AEN13915"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000287></A
288><H2
289>Description</H2
290><P
291></P
292></DIV
293><DIV
294CLASS="REFSECT1"
295><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000296NAME="AEN13918"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000297></A
298><H2
299>Details</H2
300><DIV
301CLASS="REFSECT2"
302><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000303NAME="AEN13920"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000304></A
305><H3
306><A
307NAME="XMLCHARENCODING"
308></A
309>enum xmlCharEncoding</H3
310><TABLE
311BORDER="0"
312BGCOLOR="#D6E8FF"
313WIDTH="100%"
314CELLPADDING="6"
315><TR
316><TD
317><PRE
318CLASS="PROGRAMLISTING"
319>typedef enum {
320 XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
321 XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
322 XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
323 XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
324 XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
325 XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
326 XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
327 XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
328 XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
329 XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
330 XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
331 XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
332 XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
333 XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
334 XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
335 XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
336 XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
337 XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
338 XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
339 XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
340 XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
341 XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
342 XML_CHAR_ENCODING_EUC_JP= 21 /* EUC-JP */
343} xmlCharEncoding;</PRE
344></TD
345></TR
346></TABLE
347><P
348></P
349></DIV
350><HR><DIV
351CLASS="REFSECT2"
352><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000353NAME="AEN13925"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000354></A
355><H3
356><A
357NAME="XMLCHARENCODINGINPUTFUNC"
358></A
359>xmlCharEncodingInputFunc ()</H3
360><TABLE
361BORDER="0"
362BGCOLOR="#D6E8FF"
363WIDTH="100%"
364CELLPADDING="6"
365><TR
366><TD
367><PRE
368CLASS="PROGRAMLISTING"
369>int (*xmlCharEncodingInputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000370 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000371 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000372 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000373></TD
374></TR
375></TABLE
376><P
377></P
378><DIV
379CLASS="INFORMALTABLE"
380><P
381></P
382><TABLE
383BORDER="0"
384WIDTH="100%"
385BGCOLOR="#FFD0D0"
386CELLSPACING="0"
387CELLPADDING="4"
388CLASS="CALSTABLE"
389><TR
390><TD
391WIDTH="20%"
392ALIGN="RIGHT"
393VALIGN="TOP"
394><TT
395CLASS="PARAMETER"
396><I
397>out</I
398></TT
399>&nbsp;:</TD
400><TD
401WIDTH="80%"
402ALIGN="LEFT"
403VALIGN="TOP"
404>&nbsp;</TD
405></TR
406><TR
407><TD
408WIDTH="20%"
409ALIGN="RIGHT"
410VALIGN="TOP"
411><TT
412CLASS="PARAMETER"
413><I
414>outlen</I
415></TT
416>&nbsp;:</TD
417><TD
418WIDTH="80%"
419ALIGN="LEFT"
420VALIGN="TOP"
421>&nbsp;</TD
422></TR
423><TR
424><TD
425WIDTH="20%"
426ALIGN="RIGHT"
427VALIGN="TOP"
428><TT
429CLASS="PARAMETER"
430><I
431>in</I
432></TT
433>&nbsp;:</TD
434><TD
435WIDTH="80%"
436ALIGN="LEFT"
437VALIGN="TOP"
438>&nbsp;</TD
439></TR
440><TR
441><TD
442WIDTH="20%"
443ALIGN="RIGHT"
444VALIGN="TOP"
445><TT
446CLASS="PARAMETER"
447><I
448>inlen</I
449></TT
450>&nbsp;:</TD
451><TD
452WIDTH="80%"
453ALIGN="LEFT"
454VALIGN="TOP"
455>&nbsp;</TD
456></TR
457><TR
458><TD
459WIDTH="20%"
460ALIGN="RIGHT"
461VALIGN="TOP"
462><I
463CLASS="EMPHASIS"
464>Returns</I
465> :</TD
466><TD
467WIDTH="80%"
468ALIGN="LEFT"
469VALIGN="TOP"
470>&nbsp;</TD
471></TR
472></TABLE
473><P
474></P
475></DIV
476></DIV
477><HR><DIV
478CLASS="REFSECT2"
479><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000480NAME="AEN13955"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000481></A
482><H3
483><A
484NAME="XMLCHARENCODINGOUTPUTFUNC"
485></A
486>xmlCharEncodingOutputFunc ()</H3
487><TABLE
488BORDER="0"
489BGCOLOR="#D6E8FF"
490WIDTH="100%"
491CELLPADDING="6"
492><TR
493><TD
494><PRE
495CLASS="PROGRAMLISTING"
496>int (*xmlCharEncodingOutputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000497 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000498 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000499 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000500></TD
501></TR
502></TABLE
503><P
504></P
505><DIV
506CLASS="INFORMALTABLE"
507><P
508></P
509><TABLE
510BORDER="0"
511WIDTH="100%"
512BGCOLOR="#FFD0D0"
513CELLSPACING="0"
514CELLPADDING="4"
515CLASS="CALSTABLE"
516><TR
517><TD
518WIDTH="20%"
519ALIGN="RIGHT"
520VALIGN="TOP"
521><TT
522CLASS="PARAMETER"
523><I
524>out</I
525></TT
526>&nbsp;:</TD
527><TD
528WIDTH="80%"
529ALIGN="LEFT"
530VALIGN="TOP"
531>&nbsp;</TD
532></TR
533><TR
534><TD
535WIDTH="20%"
536ALIGN="RIGHT"
537VALIGN="TOP"
538><TT
539CLASS="PARAMETER"
540><I
541>outlen</I
542></TT
543>&nbsp;:</TD
544><TD
545WIDTH="80%"
546ALIGN="LEFT"
547VALIGN="TOP"
548>&nbsp;</TD
549></TR
550><TR
551><TD
552WIDTH="20%"
553ALIGN="RIGHT"
554VALIGN="TOP"
555><TT
556CLASS="PARAMETER"
557><I
558>in</I
559></TT
560>&nbsp;:</TD
561><TD
562WIDTH="80%"
563ALIGN="LEFT"
564VALIGN="TOP"
565>&nbsp;</TD
566></TR
567><TR
568><TD
569WIDTH="20%"
570ALIGN="RIGHT"
571VALIGN="TOP"
572><TT
573CLASS="PARAMETER"
574><I
575>inlen</I
576></TT
577>&nbsp;:</TD
578><TD
579WIDTH="80%"
580ALIGN="LEFT"
581VALIGN="TOP"
582>&nbsp;</TD
583></TR
584><TR
585><TD
586WIDTH="20%"
587ALIGN="RIGHT"
588VALIGN="TOP"
589><I
590CLASS="EMPHASIS"
591>Returns</I
592> :</TD
593><TD
594WIDTH="80%"
595ALIGN="LEFT"
596VALIGN="TOP"
597>&nbsp;</TD
598></TR
599></TABLE
600><P
601></P
602></DIV
603></DIV
604><HR><DIV
605CLASS="REFSECT2"
606><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000607NAME="AEN13985"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000608></A
609><H3
610><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000611NAME="XMLCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000612></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000613>struct xmlCharEncodingHandler</H3
614><TABLE
615BORDER="0"
616BGCOLOR="#D6E8FF"
617WIDTH="100%"
618CELLPADDING="6"
619><TR
620><TD
621><PRE
622CLASS="PROGRAMLISTING"
623>struct xmlCharEncodingHandler {
624 char *name;
625 xmlCharEncodingInputFunc input;
626 xmlCharEncodingOutputFunc output;
627#ifdef LIBXML_ICONV_ENABLED
628 iconv_t iconv_in;
629 iconv_t iconv_out;
630#endif /* LIBXML_ICONV_ENABLED */
631};</PRE
632></TD
633></TR
634></TABLE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000635><P
636></P
637></DIV
638><HR><DIV
639CLASS="REFSECT2"
640><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000641NAME="AEN13990"
642></A
643><H3
644><A
645NAME="XMLCHARENCODINGHANDLERPTR"
646></A
647>xmlCharEncodingHandlerPtr</H3
648><TABLE
649BORDER="0"
650BGCOLOR="#D6E8FF"
651WIDTH="100%"
652CELLPADDING="6"
653><TR
654><TD
655><PRE
656CLASS="PROGRAMLISTING"
657>typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;</PRE
658></TD
659></TR
660></TABLE
661><P
662></P
663></DIV
664><HR><DIV
665CLASS="REFSECT2"
666><A
667NAME="AEN13995"
668></A
669><H3
670><A
671NAME="XMLINITCHARENCODINGHANDLERS"
672></A
673>xmlInitCharEncodingHandlers ()</H3
674><TABLE
675BORDER="0"
676BGCOLOR="#D6E8FF"
677WIDTH="100%"
678CELLPADDING="6"
679><TR
680><TD
681><PRE
682CLASS="PROGRAMLISTING"
683>void xmlInitCharEncodingHandlers (void);</PRE
684></TD
685></TR
686></TABLE
687><P
688>Initialize the char encoding support, it registers the default
689encoding supported.
690NOTE: while public, this function usually doesn't need to be called
691in normal processing.</P
692><P
693></P
694></DIV
695><HR><DIV
696CLASS="REFSECT2"
697><A
698NAME="AEN14001"
699></A
700><H3
701><A
702NAME="XMLCLEANUPCHARENCODINGHANDLERS"
703></A
704>xmlCleanupCharEncodingHandlers ()</H3
705><TABLE
706BORDER="0"
707BGCOLOR="#D6E8FF"
708WIDTH="100%"
709CELLPADDING="6"
710><TR
711><TD
712><PRE
713CLASS="PROGRAMLISTING"
714>void xmlCleanupCharEncodingHandlers (void);</PRE
715></TD
716></TR
717></TABLE
718><P
719>Cleanup the memory allocated for the char encoding support, it
720unregisters all the encoding handlers.</P
721><P
722></P
723></DIV
724><HR><DIV
725CLASS="REFSECT2"
726><A
727NAME="AEN14007"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000728></A
729><H3
730><A
731NAME="XMLREGISTERCHARENCODINGHANDLER"
732></A
733>xmlRegisterCharEncodingHandler ()</H3
734><TABLE
735BORDER="0"
736BGCOLOR="#D6E8FF"
737WIDTH="100%"
738CELLPADDING="6"
739><TR
740><TD
741><PRE
742CLASS="PROGRAMLISTING"
743>void xmlRegisterCharEncodingHandler (<A
744HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
745>xmlCharEncodingHandlerPtr</A
746> handler);</PRE
747></TD
748></TR
749></TABLE
750><P
751>Register the char encoding handler, surprizing, isn't it ?</P
752><P
753></P
754><DIV
755CLASS="INFORMALTABLE"
756><P
757></P
758><TABLE
759BORDER="0"
760WIDTH="100%"
761BGCOLOR="#FFD0D0"
762CELLSPACING="0"
763CELLPADDING="4"
764CLASS="CALSTABLE"
765><TR
766><TD
767WIDTH="20%"
768ALIGN="RIGHT"
769VALIGN="TOP"
770><TT
771CLASS="PARAMETER"
772><I
773>handler</I
774></TT
775>&nbsp;:</TD
776><TD
777WIDTH="80%"
778ALIGN="LEFT"
779VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000780> the xmlCharEncodingHandlerPtr handler block</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000781></TR
782></TABLE
783><P
784></P
785></DIV
786></DIV
787><HR><DIV
788CLASS="REFSECT2"
789><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000790NAME="AEN14023"
791></A
792><H3
793><A
794NAME="XMLDETECTCHARENCODING"
795></A
796>xmlDetectCharEncoding ()</H3
797><TABLE
798BORDER="0"
799BGCOLOR="#D6E8FF"
800WIDTH="100%"
801CELLPADDING="6"
802><TR
803><TD
804><PRE
805CLASS="PROGRAMLISTING"
806><A
807HREF="gnome-xml-encoding.html#XMLCHARENCODING"
808>xmlCharEncoding</A
809> xmlDetectCharEncoding (unsigned char *in,
810 int len);</PRE
811></TD
812></TR
813></TABLE
814><P
815>Guess the encoding of the entity using the first bytes of the entity content
816accordingly of the non-normative appendix F of the XML-1.0 recommendation.</P
817><P
818></P
819><DIV
820CLASS="INFORMALTABLE"
821><P
822></P
823><TABLE
824BORDER="0"
825WIDTH="100%"
826BGCOLOR="#FFD0D0"
827CELLSPACING="0"
828CELLPADDING="4"
829CLASS="CALSTABLE"
830><TR
831><TD
832WIDTH="20%"
833ALIGN="RIGHT"
834VALIGN="TOP"
835><TT
836CLASS="PARAMETER"
837><I
838>in</I
839></TT
840>&nbsp;:</TD
841><TD
842WIDTH="80%"
843ALIGN="LEFT"
844VALIGN="TOP"
845> a pointer to the first bytes of the XML entity, must be at least
8464 bytes long.</TD
847></TR
848><TR
849><TD
850WIDTH="20%"
851ALIGN="RIGHT"
852VALIGN="TOP"
853><TT
854CLASS="PARAMETER"
855><I
856>len</I
857></TT
858>&nbsp;:</TD
859><TD
860WIDTH="80%"
861ALIGN="LEFT"
862VALIGN="TOP"
863> pointer to the length of the buffer</TD
864></TR
865><TR
866><TD
867WIDTH="20%"
868ALIGN="RIGHT"
869VALIGN="TOP"
870><I
871CLASS="EMPHASIS"
872>Returns</I
873> :</TD
874><TD
875WIDTH="80%"
876ALIGN="LEFT"
877VALIGN="TOP"
878>one of the XML_CHAR_ENCODING_... values.</TD
879></TR
880></TABLE
881><P
882></P
883></DIV
884></DIV
885><HR><DIV
886CLASS="REFSECT2"
887><A
888NAME="AEN14047"
889></A
890><H3
891><A
892NAME="XMLPARSECHARENCODING"
893></A
894>xmlParseCharEncoding ()</H3
895><TABLE
896BORDER="0"
897BGCOLOR="#D6E8FF"
898WIDTH="100%"
899CELLPADDING="6"
900><TR
901><TD
902><PRE
903CLASS="PROGRAMLISTING"
904><A
905HREF="gnome-xml-encoding.html#XMLCHARENCODING"
906>xmlCharEncoding</A
907> xmlParseCharEncoding (const char *name);</PRE
908></TD
909></TR
910></TABLE
911><P
912>Conpare the string to the known encoding schemes already known. Note
913that the comparison is case insensitive accordingly to the section
914[XML] 4.3.3 Character Encoding in Entities.</P
915><P
916></P
917><DIV
918CLASS="INFORMALTABLE"
919><P
920></P
921><TABLE
922BORDER="0"
923WIDTH="100%"
924BGCOLOR="#FFD0D0"
925CELLSPACING="0"
926CELLPADDING="4"
927CLASS="CALSTABLE"
928><TR
929><TD
930WIDTH="20%"
931ALIGN="RIGHT"
932VALIGN="TOP"
933><TT
934CLASS="PARAMETER"
935><I
936>name</I
937></TT
938>&nbsp;:</TD
939><TD
940WIDTH="80%"
941ALIGN="LEFT"
942VALIGN="TOP"
943> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
944></TR
945><TR
946><TD
947WIDTH="20%"
948ALIGN="RIGHT"
949VALIGN="TOP"
950><I
951CLASS="EMPHASIS"
952>Returns</I
953> :</TD
954><TD
955WIDTH="80%"
956ALIGN="LEFT"
957VALIGN="TOP"
958>one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE
959if not recognized.</TD
960></TR
961></TABLE
962><P
963></P
964></DIV
965></DIV
966><HR><DIV
967CLASS="REFSECT2"
968><A
969NAME="AEN14067"
970></A
971><H3
972><A
973NAME="XMLGETCHARENCODINGNAME"
974></A
975>xmlGetCharEncodingName ()</H3
976><TABLE
977BORDER="0"
978BGCOLOR="#D6E8FF"
979WIDTH="100%"
980CELLPADDING="6"
981><TR
982><TD
983><PRE
984CLASS="PROGRAMLISTING"
985>const char* xmlGetCharEncodingName (<A
986HREF="gnome-xml-encoding.html#XMLCHARENCODING"
987>xmlCharEncoding</A
988> enc);</PRE
989></TD
990></TR
991></TABLE
992><P
993>The "canonical" name for XML encoding.
994C.f. http://www.w3.org/TR/REC-xml<GTKDOCLINK
995HREF="CHARENCODING"
996>charencoding</GTKDOCLINK
997>
998Section 4.3.3 Character Encoding in Entities</P
999><P
1000></P
1001><DIV
1002CLASS="INFORMALTABLE"
1003><P
1004></P
1005><TABLE
1006BORDER="0"
1007WIDTH="100%"
1008BGCOLOR="#FFD0D0"
1009CELLSPACING="0"
1010CELLPADDING="4"
1011CLASS="CALSTABLE"
1012><TR
1013><TD
1014WIDTH="20%"
1015ALIGN="RIGHT"
1016VALIGN="TOP"
1017><TT
1018CLASS="PARAMETER"
1019><I
1020>enc</I
1021></TT
1022>&nbsp;:</TD
1023><TD
1024WIDTH="80%"
1025ALIGN="LEFT"
1026VALIGN="TOP"
1027> the encoding</TD
1028></TR
1029><TR
1030><TD
1031WIDTH="20%"
1032ALIGN="RIGHT"
1033VALIGN="TOP"
1034><I
1035CLASS="EMPHASIS"
1036>Returns</I
1037> :</TD
1038><TD
1039WIDTH="80%"
1040ALIGN="LEFT"
1041VALIGN="TOP"
1042>the canonical name for the given encoding</TD
1043></TR
1044></TABLE
1045><P
1046></P
1047></DIV
1048></DIV
1049><HR><DIV
1050CLASS="REFSECT2"
1051><A
1052NAME="AEN14088"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001053></A
1054><H3
1055><A
1056NAME="XMLGETCHARENCODINGHANDLER"
1057></A
1058>xmlGetCharEncodingHandler ()</H3
1059><TABLE
1060BORDER="0"
1061BGCOLOR="#D6E8FF"
1062WIDTH="100%"
1063CELLPADDING="6"
1064><TR
1065><TD
1066><PRE
1067CLASS="PROGRAMLISTING"
1068><A
1069HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
1070>xmlCharEncodingHandlerPtr</A
1071> xmlGetCharEncodingHandler
1072 (<A
1073HREF="gnome-xml-encoding.html#XMLCHARENCODING"
1074>xmlCharEncoding</A
1075> enc);</PRE
1076></TD
1077></TR
1078></TABLE
1079><P
1080>Search in the registrered set the handler able to read/write that encoding.</P
1081><P
1082></P
1083><DIV
1084CLASS="INFORMALTABLE"
1085><P
1086></P
1087><TABLE
1088BORDER="0"
1089WIDTH="100%"
1090BGCOLOR="#FFD0D0"
1091CELLSPACING="0"
1092CELLPADDING="4"
1093CLASS="CALSTABLE"
1094><TR
1095><TD
1096WIDTH="20%"
1097ALIGN="RIGHT"
1098VALIGN="TOP"
1099><TT
1100CLASS="PARAMETER"
1101><I
1102>enc</I
1103></TT
1104>&nbsp;:</TD
1105><TD
1106WIDTH="80%"
1107ALIGN="LEFT"
1108VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001109> a string describing the char encoding.</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001110></TR
1111><TR
1112><TD
1113WIDTH="20%"
1114ALIGN="RIGHT"
1115VALIGN="TOP"
1116><I
1117CLASS="EMPHASIS"
1118>Returns</I
1119> :</TD
1120><TD
1121WIDTH="80%"
1122ALIGN="LEFT"
1123VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001124>the handler or NULL if not found</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001125></TR
1126></TABLE
1127><P
1128></P
1129></DIV
1130></DIV
1131><HR><DIV
1132CLASS="REFSECT2"
1133><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001134NAME="AEN14109"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001135></A
1136><H3
1137><A
1138NAME="XMLFINDCHARENCODINGHANDLER"
1139></A
1140>xmlFindCharEncodingHandler ()</H3
1141><TABLE
1142BORDER="0"
1143BGCOLOR="#D6E8FF"
1144WIDTH="100%"
1145CELLPADDING="6"
1146><TR
1147><TD
1148><PRE
1149CLASS="PROGRAMLISTING"
1150><A
1151HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
1152>xmlCharEncodingHandlerPtr</A
1153> xmlFindCharEncodingHandler
1154 (const char *name);</PRE
1155></TD
1156></TR
1157></TABLE
1158><P
1159></P
1160><DIV
1161CLASS="INFORMALTABLE"
1162><P
1163></P
1164><TABLE
1165BORDER="0"
1166WIDTH="100%"
1167BGCOLOR="#FFD0D0"
1168CELLSPACING="0"
1169CELLPADDING="4"
1170CLASS="CALSTABLE"
1171><TR
1172><TD
1173WIDTH="20%"
1174ALIGN="RIGHT"
1175VALIGN="TOP"
1176><TT
1177CLASS="PARAMETER"
1178><I
1179>name</I
1180></TT
1181>&nbsp;:</TD
1182><TD
1183WIDTH="80%"
1184ALIGN="LEFT"
1185VALIGN="TOP"
1186>&nbsp;</TD
1187></TR
1188><TR
1189><TD
1190WIDTH="20%"
1191ALIGN="RIGHT"
1192VALIGN="TOP"
1193><I
1194CLASS="EMPHASIS"
1195>Returns</I
1196> :</TD
1197><TD
1198WIDTH="80%"
1199ALIGN="LEFT"
1200VALIGN="TOP"
1201>&nbsp;</TD
1202></TR
1203></TABLE
1204><P
1205></P
1206></DIV
1207></DIV
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001208><HR><DIV
1209CLASS="REFSECT2"
1210><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001211NAME="AEN14128"
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001212></A
1213><H3
1214><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001215NAME="XMLCHECKUTF8"
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001216></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001217>xmlCheckUTF8 ()</H3
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001218><TABLE
1219BORDER="0"
1220BGCOLOR="#D6E8FF"
1221WIDTH="100%"
1222CELLPADDING="6"
1223><TR
1224><TD
1225><PRE
1226CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001227>int xmlCheckUTF8 (unsigned char *utf);</PRE
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001228></TD
1229></TR
1230></TABLE
1231><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001232>Checks <TT
1233CLASS="PARAMETER"
1234><I
1235>utf</I
1236></TT
1237> for being valid utf-8. <TT
1238CLASS="PARAMETER"
1239><I
1240>utf</I
1241></TT
1242> is assumed to be
1243null-terminated. This function is not super-strict, as it will
1244allow longer utf-8 sequences than necessary. Note that Java is
1245capable of producing these sequences if provoked. Also note, this
1246routine checks for the 4-byte maxiumum size, but does not check for
12470x10ffff maximum value.</P
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001248><P
1249></P
1250><DIV
1251CLASS="INFORMALTABLE"
1252><P
1253></P
1254><TABLE
1255BORDER="0"
1256WIDTH="100%"
1257BGCOLOR="#FFD0D0"
1258CELLSPACING="0"
1259CELLPADDING="4"
1260CLASS="CALSTABLE"
1261><TR
1262><TD
1263WIDTH="20%"
1264ALIGN="RIGHT"
1265VALIGN="TOP"
1266><TT
1267CLASS="PARAMETER"
1268><I
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001269>utf</I
1270></TT
1271>&nbsp;:</TD
1272><TD
1273WIDTH="80%"
1274ALIGN="LEFT"
1275VALIGN="TOP"
1276> Pointer to putative utf-8 encoded string.</TD
1277></TR
1278><TR
1279><TD
1280WIDTH="20%"
1281ALIGN="RIGHT"
1282VALIGN="TOP"
1283><I
1284CLASS="EMPHASIS"
1285>Returns</I
1286> :</TD
1287><TD
1288WIDTH="80%"
1289ALIGN="LEFT"
1290VALIGN="TOP"
1291> true if <TT
1292CLASS="PARAMETER"
1293><I
1294>utf</I
1295></TT
1296> is valid.</TD
1297></TR
1298></TABLE
1299><P
1300></P
1301></DIV
1302></DIV
1303><HR><DIV
1304CLASS="REFSECT2"
1305><A
1306NAME="AEN14150"
1307></A
1308><H3
1309><A
1310NAME="XMLCHARENCOUTFUNC"
1311></A
1312>xmlCharEncOutFunc ()</H3
1313><TABLE
1314BORDER="0"
1315BGCOLOR="#D6E8FF"
1316WIDTH="100%"
1317CELLPADDING="6"
1318><TR
1319><TD
1320><PRE
1321CLASS="PROGRAMLISTING"
1322>int xmlCharEncOutFunc (<A
1323HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
1324>xmlCharEncodingHandler</A
1325> *handler,
1326 <A
1327HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1328>xmlBufferPtr</A
1329> out,
1330 <A
1331HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1332>xmlBufferPtr</A
1333> in);</PRE
1334></TD
1335></TR
1336></TABLE
1337><P
1338>Generic front-end for the encoding handler output function
1339a first call with <TT
1340CLASS="PARAMETER"
1341><I
1342>in</I
1343></TT
1344> == NULL has to be made firs to initiate the
1345output in case of non-stateless encoding needing to initiate their
1346state or the output (like the BOM in UTF16).
1347In case of UTF8 sequence conversion errors for the given encoder,
1348the content will be automatically remapped to a CharRef sequence.</P
1349><P
1350></P
1351><DIV
1352CLASS="INFORMALTABLE"
1353><P
1354></P
1355><TABLE
1356BORDER="0"
1357WIDTH="100%"
1358BGCOLOR="#FFD0D0"
1359CELLSPACING="0"
1360CELLPADDING="4"
1361CLASS="CALSTABLE"
1362><TR
1363><TD
1364WIDTH="20%"
1365ALIGN="RIGHT"
1366VALIGN="TOP"
1367><TT
1368CLASS="PARAMETER"
1369><I
1370>handler</I
1371></TT
1372>&nbsp;:</TD
1373><TD
1374WIDTH="80%"
1375ALIGN="LEFT"
1376VALIGN="TOP"
1377> char enconding transformation data structure</TD
1378></TR
1379><TR
1380><TD
1381WIDTH="20%"
1382ALIGN="RIGHT"
1383VALIGN="TOP"
1384><TT
1385CLASS="PARAMETER"
1386><I
1387>out</I
1388></TT
1389>&nbsp;:</TD
1390><TD
1391WIDTH="80%"
1392ALIGN="LEFT"
1393VALIGN="TOP"
1394> an xmlBuffer for the output.</TD
1395></TR
1396><TR
1397><TD
1398WIDTH="20%"
1399ALIGN="RIGHT"
1400VALIGN="TOP"
1401><TT
1402CLASS="PARAMETER"
1403><I
Daniel Veillard06047432000-04-24 11:33:38 +00001404>in</I
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001405></TT
1406>&nbsp;:</TD
1407><TD
1408WIDTH="80%"
1409ALIGN="LEFT"
1410VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001411> an xmlBuffer for the input</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001412></TR
1413><TR
1414><TD
1415WIDTH="20%"
1416ALIGN="RIGHT"
1417VALIGN="TOP"
1418><I
1419CLASS="EMPHASIS"
1420>Returns</I
1421> :</TD
1422><TD
1423WIDTH="80%"
1424ALIGN="LEFT"
1425VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001426>the number of byte written if success, or
1427-1 general error
1428-2 if the transcoding fails (for *in is not valid utf8 string or
1429the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001430></TR
1431></TABLE
1432><P
1433></P
1434></DIV
1435></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00001436><HR><DIV
1437CLASS="REFSECT2"
1438><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001439NAME="AEN14181"
Daniel Veillard06047432000-04-24 11:33:38 +00001440></A
1441><H3
1442><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001443NAME="XMLCHARENCINFUNC"
Daniel Veillard06047432000-04-24 11:33:38 +00001444></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001445>xmlCharEncInFunc ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001446><TABLE
1447BORDER="0"
1448BGCOLOR="#D6E8FF"
1449WIDTH="100%"
1450CELLPADDING="6"
1451><TR
1452><TD
1453><PRE
1454CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001455>int xmlCharEncInFunc (<A
1456HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
1457>xmlCharEncodingHandler</A
1458> *handler,
1459 <A
1460HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1461>xmlBufferPtr</A
1462> out,
1463 <A
1464HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1465>xmlBufferPtr</A
1466> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001467></TD
1468></TR
1469></TABLE
1470><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001471>Generic front-end for the encoding handler input function</P
Daniel Veillard06047432000-04-24 11:33:38 +00001472><P
1473></P
1474><DIV
1475CLASS="INFORMALTABLE"
1476><P
1477></P
1478><TABLE
1479BORDER="0"
1480WIDTH="100%"
1481BGCOLOR="#FFD0D0"
1482CELLSPACING="0"
1483CELLPADDING="4"
1484CLASS="CALSTABLE"
1485><TR
1486><TD
1487WIDTH="20%"
1488ALIGN="RIGHT"
1489VALIGN="TOP"
1490><TT
1491CLASS="PARAMETER"
1492><I
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001493>handler</I
Daniel Veillard06047432000-04-24 11:33:38 +00001494></TT
1495>&nbsp;:</TD
1496><TD
1497WIDTH="80%"
1498ALIGN="LEFT"
1499VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001500> char enconding transformation data structure</TD
1501></TR
1502><TR
1503><TD
1504WIDTH="20%"
1505ALIGN="RIGHT"
1506VALIGN="TOP"
1507><TT
1508CLASS="PARAMETER"
1509><I
1510>out</I
1511></TT
1512>&nbsp;:</TD
1513><TD
1514WIDTH="80%"
1515ALIGN="LEFT"
1516VALIGN="TOP"
1517> an xmlBuffer for the output.</TD
1518></TR
1519><TR
1520><TD
1521WIDTH="20%"
1522ALIGN="RIGHT"
1523VALIGN="TOP"
1524><TT
1525CLASS="PARAMETER"
1526><I
1527>in</I
1528></TT
1529>&nbsp;:</TD
1530><TD
1531WIDTH="80%"
1532ALIGN="LEFT"
1533VALIGN="TOP"
1534> an xmlBuffer for the input</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001535></TR
1536><TR
1537><TD
1538WIDTH="20%"
1539ALIGN="RIGHT"
1540VALIGN="TOP"
1541><I
1542CLASS="EMPHASIS"
1543>Returns</I
1544> :</TD
1545><TD
1546WIDTH="80%"
1547ALIGN="LEFT"
1548VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001549>the number of byte written if success, or
1550-1 general error
1551-2 if the transcoding fails (for *in is not valid utf8 string or
1552the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001553></TR
1554></TABLE
1555><P
1556></P
1557></DIV
1558></DIV
1559><HR><DIV
1560CLASS="REFSECT2"
1561><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001562NAME="AEN14211"
Daniel Veillard06047432000-04-24 11:33:38 +00001563></A
1564><H3
1565><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001566NAME="XMLCHARENCFIRSTLINE"
Daniel Veillard06047432000-04-24 11:33:38 +00001567></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001568>xmlCharEncFirstLine ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001569><TABLE
1570BORDER="0"
1571BGCOLOR="#D6E8FF"
1572WIDTH="100%"
1573CELLPADDING="6"
1574><TR
1575><TD
1576><PRE
1577CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001578>int xmlCharEncFirstLine (<A
1579HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
1580>xmlCharEncodingHandler</A
1581> *handler,
1582 <A
1583HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1584>xmlBufferPtr</A
1585> out,
1586 <A
1587HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1588>xmlBufferPtr</A
1589> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001590></TD
1591></TR
1592></TABLE
1593><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001594>Front-end for the encoding handler input function, but handle only
1595the very first line, i.e. limit itself to 45 chars.</P
Daniel Veillard06047432000-04-24 11:33:38 +00001596><P
1597></P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001598><DIV
1599CLASS="INFORMALTABLE"
1600><P
1601></P
1602><TABLE
1603BORDER="0"
1604WIDTH="100%"
1605BGCOLOR="#FFD0D0"
1606CELLSPACING="0"
1607CELLPADDING="4"
1608CLASS="CALSTABLE"
1609><TR
1610><TD
1611WIDTH="20%"
1612ALIGN="RIGHT"
1613VALIGN="TOP"
1614><TT
1615CLASS="PARAMETER"
1616><I
1617>handler</I
1618></TT
1619>&nbsp;:</TD
1620><TD
1621WIDTH="80%"
1622ALIGN="LEFT"
1623VALIGN="TOP"
1624> char enconding transformation data structure</TD
1625></TR
1626><TR
1627><TD
1628WIDTH="20%"
1629ALIGN="RIGHT"
1630VALIGN="TOP"
1631><TT
1632CLASS="PARAMETER"
1633><I
1634>out</I
1635></TT
1636>&nbsp;:</TD
1637><TD
1638WIDTH="80%"
1639ALIGN="LEFT"
1640VALIGN="TOP"
1641> an xmlBuffer for the output.</TD
1642></TR
1643><TR
1644><TD
1645WIDTH="20%"
1646ALIGN="RIGHT"
1647VALIGN="TOP"
1648><TT
1649CLASS="PARAMETER"
1650><I
1651>in</I
1652></TT
1653>&nbsp;:</TD
1654><TD
1655WIDTH="80%"
1656ALIGN="LEFT"
1657VALIGN="TOP"
1658> an xmlBuffer for the input</TD
1659></TR
1660><TR
1661><TD
1662WIDTH="20%"
1663ALIGN="RIGHT"
1664VALIGN="TOP"
1665><I
1666CLASS="EMPHASIS"
1667>Returns</I
1668> :</TD
1669><TD
1670WIDTH="80%"
1671ALIGN="LEFT"
1672VALIGN="TOP"
1673>the number of byte written if success, or
1674-1 general error
1675-2 if the transcoding fails (for *in is not valid utf8 string or
1676the result of transformation can't fit into the encoding we want), or</TD
1677></TR
1678></TABLE
1679><P
1680></P
1681></DIV
1682></DIV
1683><HR><DIV
1684CLASS="REFSECT2"
1685><A
1686NAME="AEN14241"
1687></A
1688><H3
1689><A
1690NAME="XMLCHARENCCLOSEFUNC"
1691></A
1692>xmlCharEncCloseFunc ()</H3
1693><TABLE
1694BORDER="0"
1695BGCOLOR="#D6E8FF"
1696WIDTH="100%"
1697CELLPADDING="6"
1698><TR
1699><TD
1700><PRE
1701CLASS="PROGRAMLISTING"
1702>int xmlCharEncCloseFunc (<A
1703HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
1704>xmlCharEncodingHandler</A
1705> *handler);</PRE
1706></TD
1707></TR
1708></TABLE
1709><P
1710>Generic front-end for hencoding handler close function</P
1711><P
1712></P
1713><DIV
1714CLASS="INFORMALTABLE"
1715><P
1716></P
1717><TABLE
1718BORDER="0"
1719WIDTH="100%"
1720BGCOLOR="#FFD0D0"
1721CELLSPACING="0"
1722CELLPADDING="4"
1723CLASS="CALSTABLE"
1724><TR
1725><TD
1726WIDTH="20%"
1727ALIGN="RIGHT"
1728VALIGN="TOP"
1729><TT
1730CLASS="PARAMETER"
1731><I
1732>handler</I
1733></TT
1734>&nbsp;:</TD
1735><TD
1736WIDTH="80%"
1737ALIGN="LEFT"
1738VALIGN="TOP"
1739> char enconding transformation data structure</TD
1740></TR
1741><TR
1742><TD
1743WIDTH="20%"
1744ALIGN="RIGHT"
1745VALIGN="TOP"
1746><I
1747CLASS="EMPHASIS"
1748>Returns</I
1749> :</TD
1750><TD
1751WIDTH="80%"
1752ALIGN="LEFT"
1753VALIGN="TOP"
1754>0 if success, or -1 in case of error</TD
1755></TR
1756></TABLE
1757><P
1758></P
1759></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00001760></DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001761></DIV
1762><DIV
1763CLASS="NAVFOOTER"
1764><BR
1765CLEAR="all"><BR><TABLE
1766WIDTH="100%"
1767BORDER="0"
1768BGCOLOR="#000000"
1769CELLPADDING="1"
1770CELLSPACING="0"
1771><TR
1772><TD
1773WIDTH="25%"
1774BGCOLOR="#C00000"
1775ALIGN="left"
1776><A
1777HREF="gnome-xml-parserinternals.html"
1778><FONT
1779COLOR="#FFFFFF"
1780SIZE="3"
1781><B
1782>&#60;&#60;&#60; Previous Page</B
1783></FONT
1784></A
1785></TD
1786><TD
1787WIDTH="25%"
1788BGCOLOR="#0000C0"
1789ALIGN="center"
1790><FONT
1791COLOR="#FFFFFF"
1792SIZE="3"
1793><B
1794><A
1795HREF="book1.html"
1796><FONT
1797COLOR="#FFFFFF"
1798SIZE="3"
1799><B
1800>Home</B
1801></FONT
1802></A
1803></B
1804></FONT
1805></TD
1806><TD
1807WIDTH="25%"
1808BGCOLOR="#00C000"
1809ALIGN="center"
1810><FONT
1811COLOR="#FFFFFF"
1812SIZE="3"
1813><B
1814><A
1815HREF="libxml-lib.html"
1816><FONT
1817COLOR="#FFFFFF"
1818SIZE="3"
1819><B
1820>Up</B
1821></FONT
1822></A
1823></B
1824></FONT
1825></TD
1826><TD
1827WIDTH="25%"
1828BGCOLOR="#C00000"
1829ALIGN="right"
1830><A
1831HREF="gnome-xml-debugxml.html"
1832><FONT
1833COLOR="#FFFFFF"
1834SIZE="3"
1835><B
1836>Next Page &#62;&#62;&#62;</B
1837></FONT
1838></A
1839></TD
1840></TR
1841><TR
1842><TD
1843COLSPAN="2"
1844ALIGN="left"
1845><FONT
1846COLOR="#FFFFFF"
1847SIZE="3"
1848><B
1849>parserInternals</B
1850></FONT
1851></TD
1852><TD
1853COLSPAN="2"
1854ALIGN="right"
1855><FONT
1856COLOR="#FFFFFF"
1857SIZE="3"
1858><B
1859>debugXML</B
1860></FONT
1861></TD
1862></TR
1863></TABLE
1864></DIV
1865></BODY
1866></HTML
1867>