blob: 4880241fef4603184cb5381d77fd0b72ff4f7f47 [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 Veillard7c29ce22000-08-12 21:20:53 +0000118NAME="AEN14357"
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 Veillard7c29ce22000-08-12 21:20:53 +0000126NAME="AEN14360"
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 Veillard7c29ce22000-08-12 21:20:53 +0000286NAME="AEN14398"
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 Veillard7c29ce22000-08-12 21:20:53 +0000296NAME="AEN14401"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000297></A
298><H2
299>Details</H2
300><DIV
301CLASS="REFSECT2"
302><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +0000303NAME="AEN14403"
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 */
Daniel Veillarde46e20d2000-07-14 15:02:46 +0000342 XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
343 XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000344} xmlCharEncoding;</PRE
345></TD
346></TR
347></TABLE
348><P
349></P
350></DIV
351><HR><DIV
352CLASS="REFSECT2"
353><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +0000354NAME="AEN14408"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000355></A
356><H3
357><A
358NAME="XMLCHARENCODINGINPUTFUNC"
359></A
360>xmlCharEncodingInputFunc ()</H3
361><TABLE
362BORDER="0"
363BGCOLOR="#D6E8FF"
364WIDTH="100%"
365CELLPADDING="6"
366><TR
367><TD
368><PRE
369CLASS="PROGRAMLISTING"
370>int (*xmlCharEncodingInputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000371 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000372 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000373 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000374></TD
375></TR
376></TABLE
377><P
378></P
379><DIV
380CLASS="INFORMALTABLE"
381><P
382></P
383><TABLE
384BORDER="0"
385WIDTH="100%"
386BGCOLOR="#FFD0D0"
387CELLSPACING="0"
388CELLPADDING="4"
389CLASS="CALSTABLE"
390><TR
391><TD
392WIDTH="20%"
393ALIGN="RIGHT"
394VALIGN="TOP"
395><TT
396CLASS="PARAMETER"
397><I
398>out</I
399></TT
400>&nbsp;:</TD
401><TD
402WIDTH="80%"
403ALIGN="LEFT"
404VALIGN="TOP"
405>&nbsp;</TD
406></TR
407><TR
408><TD
409WIDTH="20%"
410ALIGN="RIGHT"
411VALIGN="TOP"
412><TT
413CLASS="PARAMETER"
414><I
415>outlen</I
416></TT
417>&nbsp;:</TD
418><TD
419WIDTH="80%"
420ALIGN="LEFT"
421VALIGN="TOP"
422>&nbsp;</TD
423></TR
424><TR
425><TD
426WIDTH="20%"
427ALIGN="RIGHT"
428VALIGN="TOP"
429><TT
430CLASS="PARAMETER"
431><I
432>in</I
433></TT
434>&nbsp;:</TD
435><TD
436WIDTH="80%"
437ALIGN="LEFT"
438VALIGN="TOP"
439>&nbsp;</TD
440></TR
441><TR
442><TD
443WIDTH="20%"
444ALIGN="RIGHT"
445VALIGN="TOP"
446><TT
447CLASS="PARAMETER"
448><I
449>inlen</I
450></TT
451>&nbsp;:</TD
452><TD
453WIDTH="80%"
454ALIGN="LEFT"
455VALIGN="TOP"
456>&nbsp;</TD
457></TR
458><TR
459><TD
460WIDTH="20%"
461ALIGN="RIGHT"
462VALIGN="TOP"
463><I
464CLASS="EMPHASIS"
465>Returns</I
466> :</TD
467><TD
468WIDTH="80%"
469ALIGN="LEFT"
470VALIGN="TOP"
471>&nbsp;</TD
472></TR
473></TABLE
474><P
475></P
476></DIV
477></DIV
478><HR><DIV
479CLASS="REFSECT2"
480><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +0000481NAME="AEN14438"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000482></A
483><H3
484><A
485NAME="XMLCHARENCODINGOUTPUTFUNC"
486></A
487>xmlCharEncodingOutputFunc ()</H3
488><TABLE
489BORDER="0"
490BGCOLOR="#D6E8FF"
491WIDTH="100%"
492CELLPADDING="6"
493><TR
494><TD
495><PRE
496CLASS="PROGRAMLISTING"
497>int (*xmlCharEncodingOutputFunc) (unsigned char *out,
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000498 int *outlen,
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000499 unsigned char *in,
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000500 int *inlen);</PRE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000501></TD
502></TR
503></TABLE
504><P
505></P
506><DIV
507CLASS="INFORMALTABLE"
508><P
509></P
510><TABLE
511BORDER="0"
512WIDTH="100%"
513BGCOLOR="#FFD0D0"
514CELLSPACING="0"
515CELLPADDING="4"
516CLASS="CALSTABLE"
517><TR
518><TD
519WIDTH="20%"
520ALIGN="RIGHT"
521VALIGN="TOP"
522><TT
523CLASS="PARAMETER"
524><I
525>out</I
526></TT
527>&nbsp;:</TD
528><TD
529WIDTH="80%"
530ALIGN="LEFT"
531VALIGN="TOP"
532>&nbsp;</TD
533></TR
534><TR
535><TD
536WIDTH="20%"
537ALIGN="RIGHT"
538VALIGN="TOP"
539><TT
540CLASS="PARAMETER"
541><I
542>outlen</I
543></TT
544>&nbsp;:</TD
545><TD
546WIDTH="80%"
547ALIGN="LEFT"
548VALIGN="TOP"
549>&nbsp;</TD
550></TR
551><TR
552><TD
553WIDTH="20%"
554ALIGN="RIGHT"
555VALIGN="TOP"
556><TT
557CLASS="PARAMETER"
558><I
559>in</I
560></TT
561>&nbsp;:</TD
562><TD
563WIDTH="80%"
564ALIGN="LEFT"
565VALIGN="TOP"
566>&nbsp;</TD
567></TR
568><TR
569><TD
570WIDTH="20%"
571ALIGN="RIGHT"
572VALIGN="TOP"
573><TT
574CLASS="PARAMETER"
575><I
576>inlen</I
577></TT
578>&nbsp;:</TD
579><TD
580WIDTH="80%"
581ALIGN="LEFT"
582VALIGN="TOP"
583>&nbsp;</TD
584></TR
585><TR
586><TD
587WIDTH="20%"
588ALIGN="RIGHT"
589VALIGN="TOP"
590><I
591CLASS="EMPHASIS"
592>Returns</I
593> :</TD
594><TD
595WIDTH="80%"
596ALIGN="LEFT"
597VALIGN="TOP"
598>&nbsp;</TD
599></TR
600></TABLE
601><P
602></P
603></DIV
604></DIV
605><HR><DIV
606CLASS="REFSECT2"
607><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +0000608NAME="AEN14468"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000609></A
610><H3
611><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000612NAME="XMLCHARENCODINGHANDLER"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000613></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000614>struct xmlCharEncodingHandler</H3
615><TABLE
616BORDER="0"
617BGCOLOR="#D6E8FF"
618WIDTH="100%"
619CELLPADDING="6"
620><TR
621><TD
622><PRE
623CLASS="PROGRAMLISTING"
624>struct xmlCharEncodingHandler {
625 char *name;
626 xmlCharEncodingInputFunc input;
627 xmlCharEncodingOutputFunc output;
628#ifdef LIBXML_ICONV_ENABLED
629 iconv_t iconv_in;
630 iconv_t iconv_out;
631#endif /* LIBXML_ICONV_ENABLED */
632};</PRE
633></TD
634></TR
635></TABLE
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000636><P
637></P
638></DIV
639><HR><DIV
640CLASS="REFSECT2"
641><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +0000642NAME="AEN14473"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000643></A
644><H3
645><A
646NAME="XMLCHARENCODINGHANDLERPTR"
647></A
648>xmlCharEncodingHandlerPtr</H3
649><TABLE
650BORDER="0"
651BGCOLOR="#D6E8FF"
652WIDTH="100%"
653CELLPADDING="6"
654><TR
655><TD
656><PRE
657CLASS="PROGRAMLISTING"
658>typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;</PRE
659></TD
660></TR
661></TABLE
662><P
663></P
664></DIV
665><HR><DIV
666CLASS="REFSECT2"
667><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +0000668NAME="AEN14478"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000669></A
670><H3
671><A
672NAME="XMLINITCHARENCODINGHANDLERS"
673></A
674>xmlInitCharEncodingHandlers ()</H3
675><TABLE
676BORDER="0"
677BGCOLOR="#D6E8FF"
678WIDTH="100%"
679CELLPADDING="6"
680><TR
681><TD
682><PRE
683CLASS="PROGRAMLISTING"
684>void xmlInitCharEncodingHandlers (void);</PRE
685></TD
686></TR
687></TABLE
688><P
689>Initialize the char encoding support, it registers the default
690encoding supported.
691NOTE: while public, this function usually doesn't need to be called
692in normal processing.</P
693><P
694></P
695></DIV
696><HR><DIV
697CLASS="REFSECT2"
698><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +0000699NAME="AEN14484"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000700></A
701><H3
702><A
703NAME="XMLCLEANUPCHARENCODINGHANDLERS"
704></A
705>xmlCleanupCharEncodingHandlers ()</H3
706><TABLE
707BORDER="0"
708BGCOLOR="#D6E8FF"
709WIDTH="100%"
710CELLPADDING="6"
711><TR
712><TD
713><PRE
714CLASS="PROGRAMLISTING"
715>void xmlCleanupCharEncodingHandlers (void);</PRE
716></TD
717></TR
718></TABLE
719><P
720>Cleanup the memory allocated for the char encoding support, it
721unregisters all the encoding handlers.</P
722><P
723></P
724></DIV
725><HR><DIV
726CLASS="REFSECT2"
727><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +0000728NAME="AEN14490"
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000729></A
730><H3
731><A
732NAME="XMLREGISTERCHARENCODINGHANDLER"
733></A
734>xmlRegisterCharEncodingHandler ()</H3
735><TABLE
736BORDER="0"
737BGCOLOR="#D6E8FF"
738WIDTH="100%"
739CELLPADDING="6"
740><TR
741><TD
742><PRE
743CLASS="PROGRAMLISTING"
744>void xmlRegisterCharEncodingHandler (<A
745HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
746>xmlCharEncodingHandlerPtr</A
747> handler);</PRE
748></TD
749></TR
750></TABLE
751><P
752>Register the char encoding handler, surprizing, isn't it ?</P
753><P
754></P
755><DIV
756CLASS="INFORMALTABLE"
757><P
758></P
759><TABLE
760BORDER="0"
761WIDTH="100%"
762BGCOLOR="#FFD0D0"
763CELLSPACING="0"
764CELLPADDING="4"
765CLASS="CALSTABLE"
766><TR
767><TD
768WIDTH="20%"
769ALIGN="RIGHT"
770VALIGN="TOP"
771><TT
772CLASS="PARAMETER"
773><I
774>handler</I
775></TT
776>&nbsp;:</TD
777><TD
778WIDTH="80%"
779ALIGN="LEFT"
780VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000781> the xmlCharEncodingHandlerPtr handler block</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000782></TR
783></TABLE
784><P
785></P
786></DIV
787></DIV
788><HR><DIV
789CLASS="REFSECT2"
790><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +0000791NAME="AEN14506"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000792></A
793><H3
794><A
795NAME="XMLDETECTCHARENCODING"
796></A
797>xmlDetectCharEncoding ()</H3
798><TABLE
799BORDER="0"
800BGCOLOR="#D6E8FF"
801WIDTH="100%"
802CELLPADDING="6"
803><TR
804><TD
805><PRE
806CLASS="PROGRAMLISTING"
807><A
808HREF="gnome-xml-encoding.html#XMLCHARENCODING"
809>xmlCharEncoding</A
810> xmlDetectCharEncoding (unsigned char *in,
811 int len);</PRE
812></TD
813></TR
814></TABLE
815><P
816>Guess the encoding of the entity using the first bytes of the entity content
817accordingly of the non-normative appendix F of the XML-1.0 recommendation.</P
818><P
819></P
820><DIV
821CLASS="INFORMALTABLE"
822><P
823></P
824><TABLE
825BORDER="0"
826WIDTH="100%"
827BGCOLOR="#FFD0D0"
828CELLSPACING="0"
829CELLPADDING="4"
830CLASS="CALSTABLE"
831><TR
832><TD
833WIDTH="20%"
834ALIGN="RIGHT"
835VALIGN="TOP"
836><TT
837CLASS="PARAMETER"
838><I
839>in</I
840></TT
841>&nbsp;:</TD
842><TD
843WIDTH="80%"
844ALIGN="LEFT"
845VALIGN="TOP"
846> a pointer to the first bytes of the XML entity, must be at least
8474 bytes long.</TD
848></TR
849><TR
850><TD
851WIDTH="20%"
852ALIGN="RIGHT"
853VALIGN="TOP"
854><TT
855CLASS="PARAMETER"
856><I
857>len</I
858></TT
859>&nbsp;:</TD
860><TD
861WIDTH="80%"
862ALIGN="LEFT"
863VALIGN="TOP"
864> pointer to the length of the buffer</TD
865></TR
866><TR
867><TD
868WIDTH="20%"
869ALIGN="RIGHT"
870VALIGN="TOP"
871><I
872CLASS="EMPHASIS"
873>Returns</I
874> :</TD
875><TD
876WIDTH="80%"
877ALIGN="LEFT"
878VALIGN="TOP"
879>one of the XML_CHAR_ENCODING_... values.</TD
880></TR
881></TABLE
882><P
883></P
884></DIV
885></DIV
886><HR><DIV
887CLASS="REFSECT2"
888><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +0000889NAME="AEN14530"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000890></A
891><H3
892><A
893NAME="XMLPARSECHARENCODING"
894></A
895>xmlParseCharEncoding ()</H3
896><TABLE
897BORDER="0"
898BGCOLOR="#D6E8FF"
899WIDTH="100%"
900CELLPADDING="6"
901><TR
902><TD
903><PRE
904CLASS="PROGRAMLISTING"
905><A
906HREF="gnome-xml-encoding.html#XMLCHARENCODING"
907>xmlCharEncoding</A
908> xmlParseCharEncoding (const char *name);</PRE
909></TD
910></TR
911></TABLE
912><P
913>Conpare the string to the known encoding schemes already known. Note
914that the comparison is case insensitive accordingly to the section
915[XML] 4.3.3 Character Encoding in Entities.</P
916><P
917></P
918><DIV
919CLASS="INFORMALTABLE"
920><P
921></P
922><TABLE
923BORDER="0"
924WIDTH="100%"
925BGCOLOR="#FFD0D0"
926CELLSPACING="0"
927CELLPADDING="4"
928CLASS="CALSTABLE"
929><TR
930><TD
931WIDTH="20%"
932ALIGN="RIGHT"
933VALIGN="TOP"
934><TT
935CLASS="PARAMETER"
936><I
937>name</I
938></TT
939>&nbsp;:</TD
940><TD
941WIDTH="80%"
942ALIGN="LEFT"
943VALIGN="TOP"
944> the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
945></TR
946><TR
947><TD
948WIDTH="20%"
949ALIGN="RIGHT"
950VALIGN="TOP"
951><I
952CLASS="EMPHASIS"
953>Returns</I
954> :</TD
955><TD
956WIDTH="80%"
957ALIGN="LEFT"
958VALIGN="TOP"
959>one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE
960if not recognized.</TD
961></TR
962></TABLE
963><P
964></P
965></DIV
966></DIV
967><HR><DIV
968CLASS="REFSECT2"
969><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +0000970NAME="AEN14550"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000971></A
972><H3
973><A
974NAME="XMLGETCHARENCODINGNAME"
975></A
976>xmlGetCharEncodingName ()</H3
977><TABLE
978BORDER="0"
979BGCOLOR="#D6E8FF"
980WIDTH="100%"
981CELLPADDING="6"
982><TR
983><TD
984><PRE
985CLASS="PROGRAMLISTING"
986>const char* xmlGetCharEncodingName (<A
987HREF="gnome-xml-encoding.html#XMLCHARENCODING"
988>xmlCharEncoding</A
989> enc);</PRE
990></TD
991></TR
992></TABLE
993><P
994>The "canonical" name for XML encoding.
995C.f. http://www.w3.org/TR/REC-xml<GTKDOCLINK
996HREF="CHARENCODING"
997>charencoding</GTKDOCLINK
998>
999Section 4.3.3 Character Encoding in Entities</P
1000><P
1001></P
1002><DIV
1003CLASS="INFORMALTABLE"
1004><P
1005></P
1006><TABLE
1007BORDER="0"
1008WIDTH="100%"
1009BGCOLOR="#FFD0D0"
1010CELLSPACING="0"
1011CELLPADDING="4"
1012CLASS="CALSTABLE"
1013><TR
1014><TD
1015WIDTH="20%"
1016ALIGN="RIGHT"
1017VALIGN="TOP"
1018><TT
1019CLASS="PARAMETER"
1020><I
1021>enc</I
1022></TT
1023>&nbsp;:</TD
1024><TD
1025WIDTH="80%"
1026ALIGN="LEFT"
1027VALIGN="TOP"
1028> the encoding</TD
1029></TR
1030><TR
1031><TD
1032WIDTH="20%"
1033ALIGN="RIGHT"
1034VALIGN="TOP"
1035><I
1036CLASS="EMPHASIS"
1037>Returns</I
1038> :</TD
1039><TD
1040WIDTH="80%"
1041ALIGN="LEFT"
1042VALIGN="TOP"
1043>the canonical name for the given encoding</TD
1044></TR
1045></TABLE
1046><P
1047></P
1048></DIV
1049></DIV
1050><HR><DIV
1051CLASS="REFSECT2"
1052><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +00001053NAME="AEN14571"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001054></A
1055><H3
1056><A
1057NAME="XMLGETCHARENCODINGHANDLER"
1058></A
1059>xmlGetCharEncodingHandler ()</H3
1060><TABLE
1061BORDER="0"
1062BGCOLOR="#D6E8FF"
1063WIDTH="100%"
1064CELLPADDING="6"
1065><TR
1066><TD
1067><PRE
1068CLASS="PROGRAMLISTING"
1069><A
1070HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
1071>xmlCharEncodingHandlerPtr</A
1072> xmlGetCharEncodingHandler
1073 (<A
1074HREF="gnome-xml-encoding.html#XMLCHARENCODING"
1075>xmlCharEncoding</A
1076> enc);</PRE
1077></TD
1078></TR
1079></TABLE
1080><P
1081>Search in the registrered set the handler able to read/write that encoding.</P
1082><P
1083></P
1084><DIV
1085CLASS="INFORMALTABLE"
1086><P
1087></P
1088><TABLE
1089BORDER="0"
1090WIDTH="100%"
1091BGCOLOR="#FFD0D0"
1092CELLSPACING="0"
1093CELLPADDING="4"
1094CLASS="CALSTABLE"
1095><TR
1096><TD
1097WIDTH="20%"
1098ALIGN="RIGHT"
1099VALIGN="TOP"
1100><TT
1101CLASS="PARAMETER"
1102><I
1103>enc</I
1104></TT
1105>&nbsp;:</TD
1106><TD
1107WIDTH="80%"
1108ALIGN="LEFT"
1109VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001110> a string describing the char encoding.</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001111></TR
1112><TR
1113><TD
1114WIDTH="20%"
1115ALIGN="RIGHT"
1116VALIGN="TOP"
1117><I
1118CLASS="EMPHASIS"
1119>Returns</I
1120> :</TD
1121><TD
1122WIDTH="80%"
1123ALIGN="LEFT"
1124VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001125>the handler or NULL if not found</TD
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001126></TR
1127></TABLE
1128><P
1129></P
1130></DIV
1131></DIV
1132><HR><DIV
1133CLASS="REFSECT2"
1134><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +00001135NAME="AEN14592"
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001136></A
1137><H3
1138><A
1139NAME="XMLFINDCHARENCODINGHANDLER"
1140></A
1141>xmlFindCharEncodingHandler ()</H3
1142><TABLE
1143BORDER="0"
1144BGCOLOR="#D6E8FF"
1145WIDTH="100%"
1146CELLPADDING="6"
1147><TR
1148><TD
1149><PRE
1150CLASS="PROGRAMLISTING"
1151><A
1152HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
1153>xmlCharEncodingHandlerPtr</A
1154> xmlFindCharEncodingHandler
1155 (const char *name);</PRE
1156></TD
1157></TR
1158></TABLE
1159><P
1160></P
1161><DIV
1162CLASS="INFORMALTABLE"
1163><P
1164></P
1165><TABLE
1166BORDER="0"
1167WIDTH="100%"
1168BGCOLOR="#FFD0D0"
1169CELLSPACING="0"
1170CELLPADDING="4"
1171CLASS="CALSTABLE"
1172><TR
1173><TD
1174WIDTH="20%"
1175ALIGN="RIGHT"
1176VALIGN="TOP"
1177><TT
1178CLASS="PARAMETER"
1179><I
1180>name</I
1181></TT
1182>&nbsp;:</TD
1183><TD
1184WIDTH="80%"
1185ALIGN="LEFT"
1186VALIGN="TOP"
1187>&nbsp;</TD
1188></TR
1189><TR
1190><TD
1191WIDTH="20%"
1192ALIGN="RIGHT"
1193VALIGN="TOP"
1194><I
1195CLASS="EMPHASIS"
1196>Returns</I
1197> :</TD
1198><TD
1199WIDTH="80%"
1200ALIGN="LEFT"
1201VALIGN="TOP"
1202>&nbsp;</TD
1203></TR
1204></TABLE
1205><P
1206></P
1207></DIV
1208></DIV
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001209><HR><DIV
1210CLASS="REFSECT2"
1211><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +00001212NAME="AEN14611"
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001213></A
1214><H3
1215><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001216NAME="XMLCHECKUTF8"
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001217></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001218>xmlCheckUTF8 ()</H3
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001219><TABLE
1220BORDER="0"
1221BGCOLOR="#D6E8FF"
1222WIDTH="100%"
1223CELLPADDING="6"
1224><TR
1225><TD
1226><PRE
1227CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001228>int xmlCheckUTF8 (unsigned char *utf);</PRE
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001229></TD
1230></TR
1231></TABLE
1232><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001233>Checks <TT
1234CLASS="PARAMETER"
1235><I
1236>utf</I
1237></TT
1238> for being valid utf-8. <TT
1239CLASS="PARAMETER"
1240><I
1241>utf</I
1242></TT
1243> is assumed to be
1244null-terminated. This function is not super-strict, as it will
1245allow longer utf-8 sequences than necessary. Note that Java is
1246capable of producing these sequences if provoked. Also note, this
1247routine checks for the 4-byte maxiumum size, but does not check for
12480x10ffff maximum value.</P
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001249><P
1250></P
1251><DIV
1252CLASS="INFORMALTABLE"
1253><P
1254></P
1255><TABLE
1256BORDER="0"
1257WIDTH="100%"
1258BGCOLOR="#FFD0D0"
1259CELLSPACING="0"
1260CELLPADDING="4"
1261CLASS="CALSTABLE"
1262><TR
1263><TD
1264WIDTH="20%"
1265ALIGN="RIGHT"
1266VALIGN="TOP"
1267><TT
1268CLASS="PARAMETER"
1269><I
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001270>utf</I
1271></TT
1272>&nbsp;:</TD
1273><TD
1274WIDTH="80%"
1275ALIGN="LEFT"
1276VALIGN="TOP"
1277> Pointer to putative utf-8 encoded string.</TD
1278></TR
1279><TR
1280><TD
1281WIDTH="20%"
1282ALIGN="RIGHT"
1283VALIGN="TOP"
1284><I
1285CLASS="EMPHASIS"
1286>Returns</I
1287> :</TD
1288><TD
1289WIDTH="80%"
1290ALIGN="LEFT"
1291VALIGN="TOP"
1292> true if <TT
1293CLASS="PARAMETER"
1294><I
1295>utf</I
1296></TT
1297> is valid.</TD
1298></TR
1299></TABLE
1300><P
1301></P
1302></DIV
1303></DIV
1304><HR><DIV
1305CLASS="REFSECT2"
1306><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +00001307NAME="AEN14633"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001308></A
1309><H3
1310><A
1311NAME="XMLCHARENCOUTFUNC"
1312></A
1313>xmlCharEncOutFunc ()</H3
1314><TABLE
1315BORDER="0"
1316BGCOLOR="#D6E8FF"
1317WIDTH="100%"
1318CELLPADDING="6"
1319><TR
1320><TD
1321><PRE
1322CLASS="PROGRAMLISTING"
1323>int xmlCharEncOutFunc (<A
1324HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
1325>xmlCharEncodingHandler</A
1326> *handler,
1327 <A
1328HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1329>xmlBufferPtr</A
1330> out,
1331 <A
1332HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1333>xmlBufferPtr</A
1334> in);</PRE
1335></TD
1336></TR
1337></TABLE
1338><P
1339>Generic front-end for the encoding handler output function
1340a first call with <TT
1341CLASS="PARAMETER"
1342><I
1343>in</I
1344></TT
1345> == NULL has to be made firs to initiate the
1346output in case of non-stateless encoding needing to initiate their
1347state or the output (like the BOM in UTF16).
1348In case of UTF8 sequence conversion errors for the given encoder,
1349the content will be automatically remapped to a CharRef sequence.</P
1350><P
1351></P
1352><DIV
1353CLASS="INFORMALTABLE"
1354><P
1355></P
1356><TABLE
1357BORDER="0"
1358WIDTH="100%"
1359BGCOLOR="#FFD0D0"
1360CELLSPACING="0"
1361CELLPADDING="4"
1362CLASS="CALSTABLE"
1363><TR
1364><TD
1365WIDTH="20%"
1366ALIGN="RIGHT"
1367VALIGN="TOP"
1368><TT
1369CLASS="PARAMETER"
1370><I
1371>handler</I
1372></TT
1373>&nbsp;:</TD
1374><TD
1375WIDTH="80%"
1376ALIGN="LEFT"
1377VALIGN="TOP"
1378> char enconding transformation data structure</TD
1379></TR
1380><TR
1381><TD
1382WIDTH="20%"
1383ALIGN="RIGHT"
1384VALIGN="TOP"
1385><TT
1386CLASS="PARAMETER"
1387><I
1388>out</I
1389></TT
1390>&nbsp;:</TD
1391><TD
1392WIDTH="80%"
1393ALIGN="LEFT"
1394VALIGN="TOP"
1395> an xmlBuffer for the output.</TD
1396></TR
1397><TR
1398><TD
1399WIDTH="20%"
1400ALIGN="RIGHT"
1401VALIGN="TOP"
1402><TT
1403CLASS="PARAMETER"
1404><I
Daniel Veillard06047432000-04-24 11:33:38 +00001405>in</I
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001406></TT
1407>&nbsp;:</TD
1408><TD
1409WIDTH="80%"
1410ALIGN="LEFT"
1411VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001412> an xmlBuffer for the input</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001413></TR
1414><TR
1415><TD
1416WIDTH="20%"
1417ALIGN="RIGHT"
1418VALIGN="TOP"
1419><I
1420CLASS="EMPHASIS"
1421>Returns</I
1422> :</TD
1423><TD
1424WIDTH="80%"
1425ALIGN="LEFT"
1426VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001427>the number of byte written if success, or
1428-1 general error
1429-2 if the transcoding fails (for *in is not valid utf8 string or
1430the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillardedfb29b2000-03-14 19:59:05 +00001431></TR
1432></TABLE
1433><P
1434></P
1435></DIV
1436></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00001437><HR><DIV
1438CLASS="REFSECT2"
1439><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +00001440NAME="AEN14664"
Daniel Veillard06047432000-04-24 11:33:38 +00001441></A
1442><H3
1443><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001444NAME="XMLCHARENCINFUNC"
Daniel Veillard06047432000-04-24 11:33:38 +00001445></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001446>xmlCharEncInFunc ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001447><TABLE
1448BORDER="0"
1449BGCOLOR="#D6E8FF"
1450WIDTH="100%"
1451CELLPADDING="6"
1452><TR
1453><TD
1454><PRE
1455CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001456>int xmlCharEncInFunc (<A
1457HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
1458>xmlCharEncodingHandler</A
1459> *handler,
1460 <A
1461HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1462>xmlBufferPtr</A
1463> out,
1464 <A
1465HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1466>xmlBufferPtr</A
1467> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001468></TD
1469></TR
1470></TABLE
1471><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001472>Generic front-end for the encoding handler input function</P
Daniel Veillard06047432000-04-24 11:33:38 +00001473><P
1474></P
1475><DIV
1476CLASS="INFORMALTABLE"
1477><P
1478></P
1479><TABLE
1480BORDER="0"
1481WIDTH="100%"
1482BGCOLOR="#FFD0D0"
1483CELLSPACING="0"
1484CELLPADDING="4"
1485CLASS="CALSTABLE"
1486><TR
1487><TD
1488WIDTH="20%"
1489ALIGN="RIGHT"
1490VALIGN="TOP"
1491><TT
1492CLASS="PARAMETER"
1493><I
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001494>handler</I
Daniel Veillard06047432000-04-24 11:33:38 +00001495></TT
1496>&nbsp;:</TD
1497><TD
1498WIDTH="80%"
1499ALIGN="LEFT"
1500VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001501> char enconding transformation data structure</TD
1502></TR
1503><TR
1504><TD
1505WIDTH="20%"
1506ALIGN="RIGHT"
1507VALIGN="TOP"
1508><TT
1509CLASS="PARAMETER"
1510><I
1511>out</I
1512></TT
1513>&nbsp;:</TD
1514><TD
1515WIDTH="80%"
1516ALIGN="LEFT"
1517VALIGN="TOP"
1518> an xmlBuffer for the output.</TD
1519></TR
1520><TR
1521><TD
1522WIDTH="20%"
1523ALIGN="RIGHT"
1524VALIGN="TOP"
1525><TT
1526CLASS="PARAMETER"
1527><I
1528>in</I
1529></TT
1530>&nbsp;:</TD
1531><TD
1532WIDTH="80%"
1533ALIGN="LEFT"
1534VALIGN="TOP"
1535> an xmlBuffer for the input</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001536></TR
1537><TR
1538><TD
1539WIDTH="20%"
1540ALIGN="RIGHT"
1541VALIGN="TOP"
1542><I
1543CLASS="EMPHASIS"
1544>Returns</I
1545> :</TD
1546><TD
1547WIDTH="80%"
1548ALIGN="LEFT"
1549VALIGN="TOP"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001550>the number of byte written if success, or
1551-1 general error
1552-2 if the transcoding fails (for *in is not valid utf8 string or
1553the result of transformation can't fit into the encoding we want), or</TD
Daniel Veillard06047432000-04-24 11:33:38 +00001554></TR
1555></TABLE
1556><P
1557></P
1558></DIV
1559></DIV
1560><HR><DIV
1561CLASS="REFSECT2"
1562><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +00001563NAME="AEN14694"
Daniel Veillard06047432000-04-24 11:33:38 +00001564></A
1565><H3
1566><A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001567NAME="XMLCHARENCFIRSTLINE"
Daniel Veillard06047432000-04-24 11:33:38 +00001568></A
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001569>xmlCharEncFirstLine ()</H3
Daniel Veillard06047432000-04-24 11:33:38 +00001570><TABLE
1571BORDER="0"
1572BGCOLOR="#D6E8FF"
1573WIDTH="100%"
1574CELLPADDING="6"
1575><TR
1576><TD
1577><PRE
1578CLASS="PROGRAMLISTING"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001579>int xmlCharEncFirstLine (<A
1580HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
1581>xmlCharEncodingHandler</A
1582> *handler,
1583 <A
1584HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1585>xmlBufferPtr</A
1586> out,
1587 <A
1588HREF="gnome-xml-tree.html#XMLBUFFERPTR"
1589>xmlBufferPtr</A
1590> in);</PRE
Daniel Veillard06047432000-04-24 11:33:38 +00001591></TD
1592></TR
1593></TABLE
1594><P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001595>Front-end for the encoding handler input function, but handle only
1596the very first line, i.e. limit itself to 45 chars.</P
Daniel Veillard06047432000-04-24 11:33:38 +00001597><P
1598></P
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001599><DIV
1600CLASS="INFORMALTABLE"
1601><P
1602></P
1603><TABLE
1604BORDER="0"
1605WIDTH="100%"
1606BGCOLOR="#FFD0D0"
1607CELLSPACING="0"
1608CELLPADDING="4"
1609CLASS="CALSTABLE"
1610><TR
1611><TD
1612WIDTH="20%"
1613ALIGN="RIGHT"
1614VALIGN="TOP"
1615><TT
1616CLASS="PARAMETER"
1617><I
1618>handler</I
1619></TT
1620>&nbsp;:</TD
1621><TD
1622WIDTH="80%"
1623ALIGN="LEFT"
1624VALIGN="TOP"
1625> char enconding transformation data structure</TD
1626></TR
1627><TR
1628><TD
1629WIDTH="20%"
1630ALIGN="RIGHT"
1631VALIGN="TOP"
1632><TT
1633CLASS="PARAMETER"
1634><I
1635>out</I
1636></TT
1637>&nbsp;:</TD
1638><TD
1639WIDTH="80%"
1640ALIGN="LEFT"
1641VALIGN="TOP"
1642> an xmlBuffer for the output.</TD
1643></TR
1644><TR
1645><TD
1646WIDTH="20%"
1647ALIGN="RIGHT"
1648VALIGN="TOP"
1649><TT
1650CLASS="PARAMETER"
1651><I
1652>in</I
1653></TT
1654>&nbsp;:</TD
1655><TD
1656WIDTH="80%"
1657ALIGN="LEFT"
1658VALIGN="TOP"
1659> an xmlBuffer for the input</TD
1660></TR
1661><TR
1662><TD
1663WIDTH="20%"
1664ALIGN="RIGHT"
1665VALIGN="TOP"
1666><I
1667CLASS="EMPHASIS"
1668>Returns</I
1669> :</TD
1670><TD
1671WIDTH="80%"
1672ALIGN="LEFT"
1673VALIGN="TOP"
1674>the number of byte written if success, or
1675-1 general error
1676-2 if the transcoding fails (for *in is not valid utf8 string or
1677the result of transformation can't fit into the encoding we want), or</TD
1678></TR
1679></TABLE
1680><P
1681></P
1682></DIV
1683></DIV
1684><HR><DIV
1685CLASS="REFSECT2"
1686><A
Daniel Veillard7c29ce22000-08-12 21:20:53 +00001687NAME="AEN14724"
Daniel Veillard3f6f7f62000-06-30 17:58:25 +00001688></A
1689><H3
1690><A
1691NAME="XMLCHARENCCLOSEFUNC"
1692></A
1693>xmlCharEncCloseFunc ()</H3
1694><TABLE
1695BORDER="0"
1696BGCOLOR="#D6E8FF"
1697WIDTH="100%"
1698CELLPADDING="6"
1699><TR
1700><TD
1701><PRE
1702CLASS="PROGRAMLISTING"
1703>int xmlCharEncCloseFunc (<A
1704HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
1705>xmlCharEncodingHandler</A
1706> *handler);</PRE
1707></TD
1708></TR
1709></TABLE
1710><P
1711>Generic front-end for hencoding handler close function</P
1712><P
1713></P
1714><DIV
1715CLASS="INFORMALTABLE"
1716><P
1717></P
1718><TABLE
1719BORDER="0"
1720WIDTH="100%"
1721BGCOLOR="#FFD0D0"
1722CELLSPACING="0"
1723CELLPADDING="4"
1724CLASS="CALSTABLE"
1725><TR
1726><TD
1727WIDTH="20%"
1728ALIGN="RIGHT"
1729VALIGN="TOP"
1730><TT
1731CLASS="PARAMETER"
1732><I
1733>handler</I
1734></TT
1735>&nbsp;:</TD
1736><TD
1737WIDTH="80%"
1738ALIGN="LEFT"
1739VALIGN="TOP"
1740> char enconding transformation data structure</TD
1741></TR
1742><TR
1743><TD
1744WIDTH="20%"
1745ALIGN="RIGHT"
1746VALIGN="TOP"
1747><I
1748CLASS="EMPHASIS"
1749>Returns</I
1750> :</TD
1751><TD
1752WIDTH="80%"
1753ALIGN="LEFT"
1754VALIGN="TOP"
1755>0 if success, or -1 in case of error</TD
1756></TR
1757></TABLE
1758><P
1759></P
1760></DIV
Daniel Veillard06047432000-04-24 11:33:38 +00001761></DIV
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001762></DIV
1763><DIV
1764CLASS="NAVFOOTER"
1765><BR
1766CLEAR="all"><BR><TABLE
1767WIDTH="100%"
1768BORDER="0"
1769BGCOLOR="#000000"
1770CELLPADDING="1"
1771CELLSPACING="0"
1772><TR
1773><TD
1774WIDTH="25%"
1775BGCOLOR="#C00000"
1776ALIGN="left"
1777><A
1778HREF="gnome-xml-parserinternals.html"
1779><FONT
1780COLOR="#FFFFFF"
1781SIZE="3"
1782><B
1783>&#60;&#60;&#60; Previous Page</B
1784></FONT
1785></A
1786></TD
1787><TD
1788WIDTH="25%"
1789BGCOLOR="#0000C0"
1790ALIGN="center"
1791><FONT
1792COLOR="#FFFFFF"
1793SIZE="3"
1794><B
1795><A
1796HREF="book1.html"
1797><FONT
1798COLOR="#FFFFFF"
1799SIZE="3"
1800><B
1801>Home</B
1802></FONT
1803></A
1804></B
1805></FONT
1806></TD
1807><TD
1808WIDTH="25%"
1809BGCOLOR="#00C000"
1810ALIGN="center"
1811><FONT
1812COLOR="#FFFFFF"
1813SIZE="3"
1814><B
1815><A
1816HREF="libxml-lib.html"
1817><FONT
1818COLOR="#FFFFFF"
1819SIZE="3"
1820><B
1821>Up</B
1822></FONT
1823></A
1824></B
1825></FONT
1826></TD
1827><TD
1828WIDTH="25%"
1829BGCOLOR="#C00000"
1830ALIGN="right"
1831><A
1832HREF="gnome-xml-debugxml.html"
1833><FONT
1834COLOR="#FFFFFF"
1835SIZE="3"
1836><B
1837>Next Page &#62;&#62;&#62;</B
1838></FONT
1839></A
1840></TD
1841></TR
1842><TR
1843><TD
1844COLSPAN="2"
1845ALIGN="left"
1846><FONT
1847COLOR="#FFFFFF"
1848SIZE="3"
1849><B
1850>parserInternals</B
1851></FONT
1852></TD
1853><TD
1854COLSPAN="2"
1855ALIGN="right"
1856><FONT
1857COLOR="#FFFFFF"
1858SIZE="3"
1859><B
1860>debugXML</B
1861></FONT
1862></TD
1863></TR
1864></TABLE
1865></DIV
1866></BODY
1867></HTML
1868>