encoding.h File Reference

#include <libxml/xmlversion.h>
#include <libxml/tree.h>

Data Structures

struct  _xmlCharEncodingHandler

Typedefs

typedef int(* xmlCharEncodingInputFunc )(unsigned char *out, int *outlen, const unsigned char *in, int *inlen)
typedef int(* xmlCharEncodingOutputFunc )(unsigned char *out, int *outlen, const unsigned char *in, int *inlen)
typedef _xmlCharEncodingHandler xmlCharEncodingHandler
typedef xmlCharEncodingHandlerxmlCharEncodingHandlerPtr

Enumerations

enum  xmlCharEncoding {
  XML_CHAR_ENCODING_ERROR = -1, XML_CHAR_ENCODING_NONE = 0, XML_CHAR_ENCODING_UTF8 = 1, XML_CHAR_ENCODING_UTF16LE = 2,
  XML_CHAR_ENCODING_UTF16BE = 3, XML_CHAR_ENCODING_UCS4LE = 4, XML_CHAR_ENCODING_UCS4BE = 5, XML_CHAR_ENCODING_EBCDIC = 6,
  XML_CHAR_ENCODING_UCS4_2143 = 7, XML_CHAR_ENCODING_UCS4_3412 = 8, XML_CHAR_ENCODING_UCS2 = 9, XML_CHAR_ENCODING_8859_1 = 10,
  XML_CHAR_ENCODING_8859_2 = 11, XML_CHAR_ENCODING_8859_3 = 12, XML_CHAR_ENCODING_8859_4 = 13, XML_CHAR_ENCODING_8859_5 = 14,
  XML_CHAR_ENCODING_8859_6 = 15, XML_CHAR_ENCODING_8859_7 = 16, XML_CHAR_ENCODING_8859_8 = 17, XML_CHAR_ENCODING_8859_9 = 18,
  XML_CHAR_ENCODING_2022_JP = 19, XML_CHAR_ENCODING_SHIFT_JIS = 20, XML_CHAR_ENCODING_EUC_JP = 21, XML_CHAR_ENCODING_ASCII = 22
}

Functions

XMLPUBFUN void XMLCALL xmlInitCharEncodingHandlers (void)
XMLPUBFUN void XMLCALL xmlCleanupCharEncodingHandlers (void)
XMLPUBFUN void XMLCALL xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler)
XMLPUBFUN xmlCharEncodingHandlerPtr
XMLCALL 
xmlGetCharEncodingHandler (xmlCharEncoding enc)
XMLPUBFUN xmlCharEncodingHandlerPtr
XMLCALL 
xmlFindCharEncodingHandler (const char *name)
XMLPUBFUN xmlCharEncodingHandlerPtr
XMLCALL 
xmlNewCharEncodingHandler (const char *name, xmlCharEncodingInputFunc input, xmlCharEncodingOutputFunc output)
XMLPUBFUN int XMLCALL xmlAddEncodingAlias (const char *name, const char *alias)
XMLPUBFUN int XMLCALL xmlDelEncodingAlias (const char *alias)
XMLPUBFUN const char *XMLCALL xmlGetEncodingAlias (const char *alias)
XMLPUBFUN void XMLCALL xmlCleanupEncodingAliases (void)
XMLPUBFUN xmlCharEncoding
XMLCALL 
xmlParseCharEncoding (const char *name)
XMLPUBFUN const char *XMLCALL xmlGetCharEncodingName (xmlCharEncoding enc)
XMLPUBFUN xmlCharEncoding
XMLCALL 
xmlDetectCharEncoding (const unsigned char *in, int len)
XMLPUBFUN int XMLCALL xmlCharEncOutFunc (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in)
XMLPUBFUN int XMLCALL xmlCharEncInFunc (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in)
XMLPUBFUN int XMLCALL xmlCharEncFirstLine (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in)
XMLPUBFUN int XMLCALL xmlCharEncCloseFunc (xmlCharEncodingHandler *handler)
XMLPUBFUN int XMLCALL isolat1ToUTF8 (unsigned char *out, int *outlen, const unsigned char *in, int *inlen)

Typedef Documentation

typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler
 

typedef xmlCharEncodingHandler* xmlCharEncodingHandlerPtr
 

typedef int(* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen, const unsigned char *in, int *inlen)
 

xmlCharEncodingInputFunc: : a pointer to an array of bytes to store the UTF-8 result : the length of : a pointer to an array of chars in the original encoding : the length of

Take a block of chars in the original encoding and try to convert it to an UTF-8 block of chars out.

Returns the number of bytes written, -1 if lack of space, or -2 if the transcoding failed. The value of after return is the number of octets consumed if the return value is positive, else unpredictiable. The value of after return is the number of octets consumed.

typedef int(* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, const unsigned char *in, int *inlen)
 

xmlCharEncodingOutputFunc: : a pointer to an array of bytes to store the result : the length of : a pointer to an array of UTF-8 chars : the length of

Take a block of UTF-8 chars in and try to convert it to another encoding. Note: a first call designed to produce heading info is called with in = NULL. If stateful this should also initialize the encoder state.

Returns the number of bytes written, -1 if lack of space, or -2 if the transcoding failed. The value of after return is the number of octets consumed if the return value is positive, else unpredictiable. The value of after return is the number of octets produced.


Enumeration Type Documentation

enum xmlCharEncoding
 

Enumerator:
XML_CHAR_ENCODING_ERROR 
XML_CHAR_ENCODING_NONE 
XML_CHAR_ENCODING_UTF8 
XML_CHAR_ENCODING_UTF16LE 
XML_CHAR_ENCODING_UTF16BE 
XML_CHAR_ENCODING_UCS4LE 
XML_CHAR_ENCODING_UCS4BE 
XML_CHAR_ENCODING_EBCDIC 
XML_CHAR_ENCODING_UCS4_2143 
XML_CHAR_ENCODING_UCS4_3412 
XML_CHAR_ENCODING_UCS2 
XML_CHAR_ENCODING_8859_1 
XML_CHAR_ENCODING_8859_2 
XML_CHAR_ENCODING_8859_3 
XML_CHAR_ENCODING_8859_4 
XML_CHAR_ENCODING_8859_5 
XML_CHAR_ENCODING_8859_6 
XML_CHAR_ENCODING_8859_7 
XML_CHAR_ENCODING_8859_8 
XML_CHAR_ENCODING_8859_9 
XML_CHAR_ENCODING_2022_JP 
XML_CHAR_ENCODING_SHIFT_JIS 
XML_CHAR_ENCODING_EUC_JP 
XML_CHAR_ENCODING_ASCII 


Function Documentation

XMLPUBFUN int XMLCALL isolat1ToUTF8 unsigned char *  out,
int outlen,
const unsigned char *  in,
int inlen
 

XMLPUBFUN int XMLCALL xmlAddEncodingAlias const char *  name,
const char *  alias
 

XMLPUBFUN int XMLCALL xmlCharEncCloseFunc xmlCharEncodingHandler handler  ) 
 

XMLPUBFUN int XMLCALL xmlCharEncFirstLine xmlCharEncodingHandler handler,
xmlBufferPtr  out,
xmlBufferPtr  in
 

XMLPUBFUN int XMLCALL xmlCharEncInFunc xmlCharEncodingHandler handler,
xmlBufferPtr  out,
xmlBufferPtr  in
 

XMLPUBFUN int XMLCALL xmlCharEncOutFunc xmlCharEncodingHandler handler,
xmlBufferPtr  out,
xmlBufferPtr  in
 

XMLPUBFUN void XMLCALL xmlCleanupCharEncodingHandlers void   ) 
 

XMLPUBFUN void XMLCALL xmlCleanupEncodingAliases void   ) 
 

XMLPUBFUN int XMLCALL xmlDelEncodingAlias const char *  alias  ) 
 

XMLPUBFUN xmlCharEncoding XMLCALL xmlDetectCharEncoding const unsigned char *  in,
int  len
 

XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL xmlFindCharEncodingHandler const char *  name  ) 
 

XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL xmlGetCharEncodingHandler xmlCharEncoding  enc  ) 
 

XMLPUBFUN const char* XMLCALL xmlGetCharEncodingName xmlCharEncoding  enc  ) 
 

XMLPUBFUN const char* XMLCALL xmlGetEncodingAlias const char *  alias  ) 
 

XMLPUBFUN void XMLCALL xmlInitCharEncodingHandlers void   ) 
 

XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL xmlNewCharEncodingHandler const char *  name,
xmlCharEncodingInputFunc  input,
xmlCharEncodingOutputFunc  output
 

XMLPUBFUN xmlCharEncoding XMLCALL xmlParseCharEncoding const char *  name  ) 
 

XMLPUBFUN void XMLCALL xmlRegisterCharEncodingHandler xmlCharEncodingHandlerPtr  handler  ) 
 


Generated on Wed Jul 26 13:26:56 2006 for XSB by  doxygen 1.4.5