Lines Matching defs:encoding

55 #include <libxml/encoding.h>
443 errmsg = "Invalid XML encoding name\n";
1618 * running with UTF-8 encoding.
1627 * Clean macros, not dependent of an ASCII context, expect UTF-8 encoding
1633 * to the number of xmlChars used for the encoding [0-5].
2249 * plug some encoding conversion routines.
2251 * encoding (like UTF16, bug 135229), the 'length'
5994 const xmlChar *encoding;
6027 * We must have the encoding declaration
6029 encoding = xmlParseEncodingDecl(ctxt);
6036 if ((encoding == NULL) && (ctxt->errNo == XML_ERR_OK)) {
6038 "Missing encoding in text declaration\n");
9054 * parse the XML encoding name
9058 * Returns the encoding name value or NULL
9116 * parse the XML encoding declaration
9118 * [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'")
9122 * Returns the encoding value or NULL
9127 xmlChar *encoding = NULL;
9141 encoding = xmlParseEncName(ctxt);
9148 encoding = xmlParseEncName(ctxt);
9157 * UTF-16 encoding stwich has already taken place at this stage,
9160 if ((encoding != NULL) &&
9161 ((!xmlStrcasecmp(encoding, BAD_CAST "UTF-16")) ||
9162 (!xmlStrcasecmp(encoding, BAD_CAST "UTF16")))) {
9163 if (ctxt->encoding != NULL)
9164 xmlFree((xmlChar *) ctxt->encoding);
9165 ctxt->encoding = encoding;
9168 * UTF-8 encoding is handled natively
9170 else if ((encoding != NULL) &&
9171 ((!xmlStrcasecmp(encoding, BAD_CAST "UTF-8")) ||
9172 (!xmlStrcasecmp(encoding, BAD_CAST "UTF8")))) {
9173 if (ctxt->encoding != NULL)
9174 xmlFree((xmlChar *) ctxt->encoding);
9175 ctxt->encoding = encoding;
9177 else if (encoding != NULL) {
9180 if (ctxt->input->encoding != NULL)
9181 xmlFree((xmlChar *) ctxt->input->encoding);
9182 ctxt->input->encoding = encoding;
9184 handler = xmlFindCharEncodingHandler((const char *) encoding);
9189 "Unsupported encoding %s\n", encoding);
9194 return(encoding);
9333 * We may have the encoding declaration
9353 if ((ctxt->input->encoding != NULL) && (!IS_BLANK_CH(RAW))) {
9438 if ((ctxt->encoding == (const xmlChar *)XML_CHAR_ENCODING_NONE) &&
9443 * plug some encoding conversion routines.
9467 * Note that we will switch encoding on the fly.
9603 * plug some encoding conversion routines.
9628 * Note that we will switch encoding on the fly.
9875 } else /* unknown encoding */
10019 * plug some encoding conversion routines,
10078 if ((ctxt->encoding == NULL) &&
10079 (ctxt->input->encoding != NULL))
10080 ctxt->encoding = xmlStrdup(ctxt->input->encoding);
10806 "Input is not proper UTF-8, indicate encoding !\n%s",
10930 * the encoding. The remaining characters will be parsed so they
10932 * To allow content encoding detection, @size should be >= 4
10948 * plug some encoding conversion routines
11024 * the encoding, we set the context to XML_CHAR_ENCODING_NONE so
11077 * @enc: the charset encoding if known
11143 * @enc: the charset encoding if known
11192 * plug some encoding conversion routines here.
11219 * plug some encoding conversion routines.
11321 * plug some encoding conversion routines here.
11501 * plug some encoding conversion routines.
11710 * plug some encoding conversion routines.
13302 DICT_FREE(ctxt->encoding);
13303 ctxt->encoding = NULL;
13367 * @encoding: the document encoding, or NULL
13375 int size, const char *filename, const char *encoding)
13384 if ((encoding == NULL) && (chunk != NULL) && (size >= 4))
13450 if (encoding != NULL) {
13453 hdlr = xmlFindCharEncodingHandler(encoding);
13458 "Unsupported encoding %s\n", BAD_CAST encoding);
13571 * @encoding: the document encoding, or NULL
13580 xmlDoRead(xmlParserCtxtPtr ctxt, const char *URL, const char *encoding,
13586 if (encoding != NULL) {
13589 hdlr = xmlFindCharEncodingHandler(encoding);
13617 * @encoding: the document encoding, or NULL
13625 xmlReadDoc(const xmlChar * cur, const char *URL, const char *encoding, int options)
13635 return (xmlDoRead(ctxt, URL, encoding, options, 0));
13641 * @encoding: the document encoding, or NULL
13649 xmlReadFile(const char *filename, const char *encoding, int options)
13656 return (xmlDoRead(ctxt, NULL, encoding, options, 0));
13664 * @encoding: the document encoding, or NULL
13672 xmlReadMemory(const char *buffer, int size, const char *URL, const char *encoding, int options)
13679 return (xmlDoRead(ctxt, URL, encoding, options, 0));
13686 * @encoding: the document encoding, or NULL
13696 xmlReadFd(int fd, const char *URL, const char *encoding, int options)
13721 return (xmlDoRead(ctxt, URL, encoding, options, 0));
13730 * @encoding: the document encoding, or NULL
13739 void *ioctx, const char *URL, const char *encoding, int options)
13764 return (xmlDoRead(ctxt, URL, encoding, options, 0));
13772 * @encoding: the document encoding, or NULL
13782 const char *URL, const char *encoding, int options)
13798 return (xmlDoRead(ctxt, URL, encoding, options, 1));
13805 * @encoding: the document encoding, or NULL
13815 const char *encoding, int options)
13831 return (xmlDoRead(ctxt, NULL, encoding, options, 1));
13840 * @encoding: the document encoding, or NULL
13850 const char *URL, const char *encoding, int options)
13874 return (xmlDoRead(ctxt, URL, encoding, options, 1));
13882 * @encoding: the document encoding, or NULL
13894 const char *URL, const char *encoding, int options)
13917 return (xmlDoRead(ctxt, URL, encoding, options, 1));
13927 * @encoding: the document encoding, or NULL
13939 const char *encoding, int options)
13961 return (xmlDoRead(ctxt, URL, encoding, options, 1));