Home | History | Annotate | Download | only in libxml2

Lines Matching refs:encoding

54 #include <libxml/encoding.h>
212 const char *encoding);
434 errmsg = "Invalid XML encoding name\n";
1770 * running with UTF-8 encoding.
1779 * Clean macros, not dependent of an ASCII context, expect UTF-8 encoding
1785 * to the number of xmlChars used for the encoding [0-5].
2407 * plug some encoding conversion routines.
2409 * encoding (like UTF16, bug 135229), the 'length'
6448 const xmlChar *encoding;
6481 * We must have the encoding declaration
6483 encoding = xmlParseEncodingDecl(ctxt);
6490 if ((encoding == NULL) && (ctxt->errNo == XML_ERR_OK)) {
6492 "Missing encoding in text declaration\n");
6527 if ((ctxt->encoding == (const xmlChar *)XML_CHAR_ENCODING_NONE) &&
9610 * parse the XML encoding name
9614 * Returns the encoding name value or NULL
9672 * parse the XML encoding declaration
9674 * [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'")
9678 * Returns the encoding value or NULL
9683 xmlChar *encoding = NULL;
9697 encoding = xmlParseEncName(ctxt);
9704 encoding = xmlParseEncName(ctxt);
9713 * UTF-16 encoding stwich has already taken place at this stage,
9716 if ((encoding != NULL) &&
9717 ((!xmlStrcasecmp(encoding, BAD_CAST "UTF-16")) ||
9718 (!xmlStrcasecmp(encoding, BAD_CAST "UTF16")))) {
9720 * If no encoding was passed to the parser, that we are
9723 * encoding mismatch fatal error
9725 if ((ctxt->encoding == NULL) &&
9731 if (ctxt->encoding != NULL)
9732 xmlFree((xmlChar *) ctxt->encoding);
9733 ctxt->encoding = encoding;
9736 * UTF-8 encoding is handled natively
9738 else if ((encoding != NULL) &&
9739 ((!xmlStrcasecmp(encoding, BAD_CAST "UTF-8")) ||
9740 (!xmlStrcasecmp(encoding, BAD_CAST "UTF8")))) {
9741 if (ctxt->encoding != NULL)
9742 xmlFree((xmlChar *) ctxt->encoding);
9743 ctxt->encoding = encoding;
9745 else if (encoding != NULL) {
9748 if (ctxt->input->encoding != NULL)
9749 xmlFree((xmlChar *) ctxt->input->encoding);
9750 ctxt->input->encoding = encoding;
9752 handler = xmlFindCharEncodingHandler((const char *) encoding);
9757 "Unsupported encoding %s\n", encoding);
9762 return(encoding);
9913 * We may have the encoding declaration
9933 if ((ctxt->input->encoding != NULL) && (!IS_BLANK_CH(RAW))) {
10018 if ((ctxt->encoding == (const xmlChar *)XML_CHAR_ENCODING_NONE) &&
10023 * plug some encoding conversion routines.
10047 * Note that we will switch encoding on the fly.
10192 * plug some encoding conversion routines.
10217 * Note that we will switch encoding on the fly.
10464 } else /* unknown encoding */
10608 * plug some encoding conversion routines,
10667 if ((ctxt->encoding == NULL) &&
10668 (ctxt->input->encoding != NULL))
10669 ctxt->encoding = xmlStrdup(ctxt->input->encoding);
11404 "Input is not proper UTF-8, indicate encoding !\n%s",
11528 * the encoding. The remaining characters will be parsed so they
11530 * To allow content encoding detection, @size should be >= 4
11546 * plug some encoding conversion routines
11622 * the encoding, we set the context to XML_CHAR_ENCODING_NONE so
11675 * @enc: the charset encoding if known
11741 * @enc: the charset encoding if known
11790 * plug some encoding conversion routines here.
11826 * plug some encoding conversion routines.
11928 * plug some encoding conversion routines here.
12123 * plug some encoding conversion routines.
12341 * plug some encoding conversion routines.
13941 DICT_FREE(ctxt->encoding);
13942 ctxt->encoding = NULL;
14005 * @encoding: the document encoding, or NULL
14013 int size, const char *filename, const char *encoding)
14022 if ((encoding == NULL) && (chunk != NULL) && (size >= 4))
14088 if (encoding != NULL) {
14091 if (ctxt->encoding != NULL)
14092 xmlFree((xmlChar *) ctxt->encoding);
14093 ctxt->encoding = xmlStrdup((const xmlChar *) encoding);
14095 hdlr = xmlFindCharEncodingHandler(encoding);
14100 "Unsupported encoding %s\n", BAD_CAST encoding);
14114 * @encoding: the user provided encoding to use
14122 xmlCtxtUseOptionsInternal(xmlParserCtxtPtr ctxt, int options, const char *encoding)
14126 if (encoding != NULL) {
14127 if (ctxt->encoding != NULL)
14128 xmlFree((xmlChar *) ctxt->encoding);
14129 ctxt->encoding = xmlStrdup((const xmlChar *) encoding);
14262 * @encoding: the document encoding, or NULL
14271 xmlDoRead(xmlParserCtxtPtr ctxt, const char *URL, const char *encoding,
14276 xmlCtxtUseOptionsInternal(ctxt, options, encoding);
14277 if (encoding != NULL) {
14280 hdlr = xmlFindCharEncodingHandler(encoding);
14308 * @encoding: the document encoding, or NULL
14316 xmlReadDoc(const xmlChar * cur, const char *URL, const char *encoding, int options)
14326 return (xmlDoRead(ctxt, URL, encoding, options, 0));
14332 * @encoding: the document encoding, or NULL
14340 xmlReadFile(const char *filename, const char *encoding, int options)
14347 return (xmlDoRead(ctxt, NULL, encoding, options, 0));
14355 * @encoding: the document encoding, or NULL
14363 xmlReadMemory(const char *buffer, int size, const char *URL, const char *encoding, int options)
14370 return (xmlDoRead(ctxt, URL, encoding, options, 0));
14377 * @encoding: the document encoding, or NULL
14387 xmlReadFd(int fd, const char *URL, const char *encoding, int options)
14412 return (xmlDoRead(ctxt, URL, encoding, options, 0));
14421 * @encoding: the document encoding, or NULL
14430 void *ioctx, const char *URL, const char *encoding, int options)
14455 return (xmlDoRead(ctxt, URL, encoding, options, 0));
14463 * @encoding: the document encoding, or NULL
14473 const char *URL, const char *encoding, int options)
14489 return (xmlDoRead(ctxt, URL, encoding, options, 1));
14496 * @encoding: the document encoding, or NULL
14506 const char *encoding, int options)
14522 return (xmlDoRead(ctxt, NULL, encoding, options, 1));
14531 * @encoding: the document encoding, or NULL
14541 const char *URL, const char *encoding, int options)
14565 return (xmlDoRead(ctxt, URL, encoding, options, 1));
14573 * @encoding: the document encoding, or NULL
14585 const char *URL, const char *encoding, int options)
14608 return (xmlDoRead(ctxt, URL, encoding, options, 1));
14618 * @encoding: the document encoding, or NULL
14630 const char *encoding, int options)
14652 return (xmlDoRead(ctxt, URL, encoding, options, 1));