|
ReactOS 0.4.16-dev-2208-g6350669
|
#include <libxml/xmlversion.h>

Go to the source code of this file.
Classes | |
| 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 struct _xmlCharEncodingHandler | xmlCharEncodingHandler |
| typedef xmlCharEncodingHandler * | xmlCharEncodingHandlerPtr |
Enumerations | |
| enum | xmlCharEncError { XML_ENC_ERR_SUCCESS = 0 , XML_ENC_ERR_SPACE = -1 , XML_ENC_ERR_INPUT = -2 , XML_ENC_ERR_PARTIAL = -3 , XML_ENC_ERR_INTERNAL = -4 , XML_ENC_ERR_MEMORY = -5 } |
| 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 } |
Definition at line 138 of file encoding.h.
Definition at line 139 of file encoding.h.
| typedef int(* xmlCharEncodingInputFunc) (unsigned char *out, int *outlen, const unsigned char *in, int *inlen) |
xmlCharEncodingInputFunc: @out: a pointer to an array of bytes to store the UTF-8 result @outlen: the length of @out @in: a pointer to an array of chars in the original encoding @inlen: the length of @in
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 @inlen after return is the number of octets consumed if the return value is positive, else unpredictiable. The value of @outlen after return is the number of octets consumed.
Definition at line 108 of file encoding.h.
| typedef int(* xmlCharEncodingOutputFunc) (unsigned char *out, int *outlen, const unsigned char *in, int *inlen) |
xmlCharEncodingOutputFunc: @out: a pointer to an array of bytes to store the result @outlen: the length of @out @in: a pointer to an array of UTF-8 chars @inlen: the length of @in
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 @inlen after return is the number of octets consumed if the return value is positive, else unpredictiable. The value of @outlen after return is the number of octets produced.
Definition at line 130 of file encoding.h.
| Enumerator | |
|---|---|
| XML_ENC_ERR_SUCCESS | |
| XML_ENC_ERR_SPACE | |
| XML_ENC_ERR_INPUT | |
| XML_ENC_ERR_PARTIAL | |
| XML_ENC_ERR_INTERNAL | |
| XML_ENC_ERR_MEMORY | |
Definition at line 35 of file encoding.h.
Definition at line 65 of file encoding.h.
| XMLPUBFUN int isolat1ToUTF8 | ( | unsigned char * | out, |
| int * | outlen, | ||
| const unsigned char * | in, | ||
| int * | inlen | ||
| ) |
isolat1ToUTF8: @out: a pointer to an array of bytes to store the result @outlen: the length of @out @in: a pointer to an array of ISO Latin 1 chars @inlen: the length of @in
Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8 block of chars out.
Returns the number of bytes written or an XML_ENC_ERR code.
The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets produced.
Definition at line 283 of file encoding.c.
Definition at line 1041 of file encoding.c.
| XMLPUBFUN int xmlCharEncCloseFunc | ( | xmlCharEncodingHandler * | handler | ) |
Referenced by xmlDetectEBCDIC(), xmlSwitchInputEncoding(), and xsltSaveResultToString().
| XML_DEPRECATED XMLPUBFUN int xmlCharEncFirstLine | ( | xmlCharEncodingHandler * | handler, |
| struct _xmlBuffer * | out, | ||
| struct _xmlBuffer * | in | ||
| ) |
| XMLPUBFUN int xmlCharEncInFunc | ( | xmlCharEncodingHandler * | handler, |
| struct _xmlBuffer * | out, | ||
| struct _xmlBuffer * | in | ||
| ) |
| XMLPUBFUN int xmlCharEncOutFunc | ( | xmlCharEncodingHandler * | handler, |
| struct _xmlBuffer * | out, | ||
| struct _xmlBuffer * | in | ||
| ) |
| XML_DEPRECATED XMLPUBFUN void xmlCleanupCharEncodingHandlers | ( | void | ) |
xmlCleanupCharEncodingHandlers:
DEPRECATED: This function will be made private. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all.
Cleanup the memory allocated for the char encoding support, it unregisters all the encoding handlers and the aliases.
Definition at line 1490 of file encoding.c.
Referenced by xmlCleanupParser().
xmlCleanupEncodingAliases:
Unregisters all aliases
Definition at line 976 of file encoding.c.
Referenced by xmlCleanupCharEncodingHandlers().
xmlDelEncodingAlias: @alias: the alias name as parsed, in UTF-8 format (ASCII actually)
Unregisters an encoding alias @alias
Returns 0 in case of success, -1 in case of error
Definition at line 1112 of file encoding.c.
xmlDetectCharEncoding: @in: a pointer to the first bytes of the XML entity, must be at least 2 bytes long (at least 4 if encoding is UTF4 variant). @len: pointer to the length of the buffer
Guess the encoding of the entity using the first bytes of the entity content according to the non-normative appendix F of the XML-1.0 recommendation.
Returns one of the XML_CHAR_ENCODING_... values.
Definition at line 916 of file encoding.c.
Referenced by internal_parseBuffer().
| XMLPUBFUN xmlCharEncodingHandlerPtr xmlFindCharEncodingHandler | ( | const char * | name | ) |
Definition at line 1677 of file encoding.c.
Referenced by init_char_encoders(), node_transform_write_to_bstr(), node_transform_write_to_stream(), xmlCtxtResetPush(), xmlDetectEBCDIC(), xmlDoRead(), xmlFindCharEncodingHandler(), xmlGetCharEncodingHandler(), xmlParseInNodeContext(), xmlSetDeclaredEncoding(), xsltSaveResultToFd(), xsltSaveResultToFile(), xsltSaveResultToFilename(), and xsltSaveResultToString().
| XMLPUBFUN xmlCharEncodingHandlerPtr xmlGetCharEncodingHandler | ( | xmlCharEncoding | enc | ) |
xmlGetCharEncodingHandler: @enc: an xmlCharEncoding value.
Search in the registered set the handler able to read/write that encoding.
Returns the handler or NULL if not found
Definition at line 1547 of file encoding.c.
Referenced by xmlDetectEBCDIC(), and xmlSwitchEncoding().
| XMLPUBFUN const char * xmlGetCharEncodingName | ( | xmlCharEncoding | enc | ) |
xmlGetCharEncodingName: @enc: the encoding
The "canonical" name for XML encoding. C.f. http://www.w3.org/TR/REC-xml#charencoding Section 4.3.3 Character Encoding in Entities
Returns the canonical name for the given encoding
Definition at line 1229 of file encoding.c.
Referenced by internal_parseBuffer(), xmlFindCharEncodingHandler(), xmlSwitchEncoding(), and xsltSaveResultTo().
xmlGetEncodingAlias: @alias: the alias name as parsed, in UTF-8 format (ASCII actually)
Lookup an encoding name for the given alias.
Returns NULL if not found, otherwise the original name
Definition at line 1003 of file encoding.c.
Referenced by xmlFindCharEncodingHandler(), xmlNewCharEncodingHandler(), and xmlParseCharEncoding().
| XML_DEPRECATED XMLPUBFUN void xmlInitCharEncodingHandlers | ( | void | ) |
xmlInitCharEncodingHandlers:
DEPRECATED: Alias for xmlInitParser.
Definition at line 1460 of file encoding.c.
| XMLPUBFUN xmlCharEncodingHandlerPtr xmlNewCharEncodingHandler | ( | const char * | name, |
| xmlCharEncodingInputFunc | input, | ||
| xmlCharEncodingOutputFunc | output | ||
| ) |
Definition at line 1394 of file encoding.c.
Referenced by init_char_encoders().
| XMLPUBFUN xmlCharEncoding xmlParseCharEncoding | ( | const char * | name | ) |
Definition at line 1148 of file encoding.c.
Referenced by xmlFindCharEncodingHandler().
| XMLPUBFUN void xmlRegisterCharEncodingHandler | ( | xmlCharEncodingHandlerPtr | handler | ) |
xmlRegisterCharEncodingHandler: @handler: the xmlCharEncodingHandlerPtr handler block
Register the char encoding handler, surprising, isn't it ?
Definition at line 1515 of file encoding.c.
Referenced by xmlNewCharEncodingHandler().