Lines Matching refs:encoding

54 #include <libxml/encoding.h>
337 errmsg = "Invalid XML encoding name\n";
1464 * running with UTF-8 encoding.
1473 * Clean macros, not dependent of an ASCII context, expect UTF-8 encoding
1479 * to the number of xmlChars used for the encoding [0-5].
2095 * plug some encoding conversion routines.
2097 * encoding (like UTF16, bug 135229), the 'length'
5741 const xmlChar *encoding;
5774 * We must have the encoding declaration
5776 encoding = xmlParseEncodingDecl(ctxt);
5783 if ((encoding == NULL) && (ctxt->errNo == XML_ERR_OK)) {
5785 "Missing encoding in text declaration\n");
8684 * parse the XML encoding name
8688 * Returns the encoding name value or NULL
8746 * parse the XML encoding declaration
8748 * [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'")
8752 * Returns the encoding value or NULL
8757 xmlChar *encoding = NULL;
8771 encoding = xmlParseEncName(ctxt);
8778 encoding = xmlParseEncName(ctxt);
8787 * UTF-16 encoding stwich has already taken place at this stage,
8790 if ((encoding != NULL) &&
8791 ((!xmlStrcasecmp(encoding, BAD_CAST "UTF-16")) ||
8792 (!xmlStrcasecmp(encoding, BAD_CAST "UTF16")))) {
8793 if (ctxt->encoding != NULL)
8794 xmlFree((xmlChar *) ctxt->encoding);
8795 ctxt->encoding = encoding;
8798 * UTF-8 encoding is handled natively
8800 else if ((encoding != NULL) &&
8801 ((!xmlStrcasecmp(encoding, BAD_CAST "UTF-8")) ||
8802 (!xmlStrcasecmp(encoding, BAD_CAST "UTF8")))) {
8803 if (ctxt->encoding != NULL)
8804 xmlFree((xmlChar *) ctxt->encoding);
8805 ctxt->encoding = encoding;
8807 else if (encoding != NULL) {
8810 if (ctxt->input->encoding != NULL)
8811 xmlFree((xmlChar *) ctxt->input->encoding);
8812 ctxt->input->encoding = encoding;
8814 handler = xmlFindCharEncodingHandler((const char *) encoding);
8819 "Unsupported encoding %s\n", encoding);
8824 return(encoding);
8958 * We may have the encoding declaration
8978 if ((ctxt->input->encoding != NULL) && (!IS_BLANK_CH(RAW))) {
9063 if ((ctxt->encoding == (const xmlChar *)XML_CHAR_ENCODING_NONE) &&
9068 * plug some encoding conversion routines.
9092 * Note that we will switch encoding on the fly.
9227 * plug some encoding conversion routines.
9252 * Note that we will switch encoding on the fly.
9499 } else /* unknown encoding */
9643 * plug some encoding conversion routines,
9702 if ((ctxt->encoding == NULL) &&
9703 (ctxt->input->encoding != NULL))
9704 ctxt->encoding = xmlStrdup(ctxt->input->encoding);
10420 "Input is not proper UTF-8, indicate encoding !\n%s",
10544 * the encoding. The remaining characters will be parsed so they
10546 * To allow content encoding detection, @size should be >= 4
10562 * plug some encoding conversion routines
10638 * the encoding, we set the context to XML_CHAR_ENCODING_NONE so
10691 * @enc: the charset encoding if known
10757 * @enc: the charset encoding if known
10804 * plug some encoding conversion routines here.
10831 * plug some encoding conversion routines.
10932 * plug some encoding conversion routines here.
11094 * plug some encoding conversion routines.
11303 * plug some encoding conversion routines.
12849 DICT_FREE(ctxt->encoding);
12850 ctxt->encoding = NULL;
12911 * @encoding: the document encoding, or NULL
12919 int size, const char *filename, const char *encoding)
12928 if ((encoding == NULL) && (chunk != NULL) && (size >= 4))
12994 if (encoding != NULL) {
12997 hdlr = xmlFindCharEncodingHandler(encoding);
13002 "Unsupported encoding %s\n", BAD_CAST encoding);
13115 * @encoding: the document encoding, or NULL
13124 xmlDoRead(xmlParserCtxtPtr ctxt, const char *URL, const char *encoding,
13130 if (encoding != NULL) {
13133 hdlr = xmlFindCharEncodingHandler(encoding);
13161 * @encoding: the document encoding, or NULL
13169 xmlReadDoc(const xmlChar * cur, const char *URL, const char *encoding, int options)
13179 return (xmlDoRead(ctxt, URL, encoding, options, 0));
13185 * @encoding: the document encoding, or NULL
13193 xmlReadFile(const char *filename, const char *encoding, int options)
13200 return (xmlDoRead(ctxt, NULL, encoding, options, 0));
13208 * @encoding: the document encoding, or NULL
13216 xmlReadMemory(const char *buffer, int size, const char *URL, const char *encoding, int options)
13223 return (xmlDoRead(ctxt, URL, encoding, options, 0));
13230 * @encoding: the document encoding, or NULL
13240 xmlReadFd(int fd, const char *URL, const char *encoding, int options)
13265 return (xmlDoRead(ctxt, URL, encoding, options, 0));
13274 * @encoding: the document encoding, or NULL
13283 void *ioctx, const char *URL, const char *encoding, int options)
13308 return (xmlDoRead(ctxt, URL, encoding, options, 0));
13316 * @encoding: the document encoding, or NULL
13326 const char *URL, const char *encoding, int options)
13342 return (xmlDoRead(ctxt, URL, encoding, options, 1));
13349 * @encoding: the document encoding, or NULL
13359 const char *encoding, int options)
13375 return (xmlDoRead(ctxt, NULL, encoding, options, 1));
13384 * @encoding: the document encoding, or NULL
13394 const char *URL, const char *encoding, int options)
13418 return (xmlDoRead(ctxt, URL, encoding, options, 1));
13426 * @encoding: the document encoding, or NULL
13438 const char *URL, const char *encoding, int options)
13461 return (xmlDoRead(ctxt, URL, encoding, options, 1));
13471 * @encoding: the document encoding, or NULL
13483 const char *encoding, int options)
13505 return (xmlDoRead(ctxt, URL, encoding, options, 1));