encoding.h File Reference

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

Go to the source code of this file.

Data Structures

struct  _xmlCharEncodingHandler

Typedefs

typedef _xmlCharEncodingHandler xmlCharEncodingHandler
typedef xmlCharEncodingHandlerxmlCharEncodingHandlerPtr
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)

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 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)


Typedef Documentation

typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler

Definition at line 129 of file encoding.h.

typedef xmlCharEncodingHandler* xmlCharEncodingHandlerPtr

Definition at line 130 of file encoding.h.

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.

Definition at line 98 of file encoding.h.

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.

Definition at line 120 of file encoding.h.


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 

Definition at line 55 of file encoding.h.


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  ) 

footer


 SourceForge.net Logo