Hash :
98840d40
Author :
Date :
2023-03-21T19:07:12
parser: Rework EBCDIC code page detection To detect EBCDIC code pages, we used to switch the encoding twice and had to be very careful not to decode data after the XML declaration before the second switch. This relied on a hard-coded expected size of the XML declaration and was complicated and unreliable. Now we convert the first 200 bytes to EBCDIC-US and parse the encoding declaration manually.
#ifndef XML_ENC_H_PRIVATE__
#define XML_ENC_H_PRIVATE__
#include <libxml/encoding.h>
#include <libxml/tree.h>
XML_HIDDEN void
xmlInitEncodingInternal(void);
XML_HIDDEN int
xmlEncInputChunk(xmlCharEncodingHandler *handler, unsigned char *out,
int *outlen, const unsigned char *in, int *inlen, int flush);
XML_HIDDEN int
xmlCharEncInput(xmlParserInputBufferPtr input, int flush);
XML_HIDDEN int
xmlCharEncOutput(xmlOutputBufferPtr output, int init);
#endif /* XML_ENC_H_PRIVATE__ */