Home | History | Annotate | Download | only in libxml2

Lines Matching refs:encoding

35  *   		Getting/Setting encoding meta tags			*
43 * Encoding definition lookup in the Meta tags
45 * Returns the current encoding as flagged in the HTML source
51 const xmlChar *encoding;
128 encoding = xmlStrstr(content, BAD_CAST"charset=");
129 if (encoding == NULL)
130 encoding = xmlStrstr(content, BAD_CAST"Charset=");
131 if (encoding == NULL)
132 encoding = xmlStrstr(content, BAD_CAST"CHARSET=");
133 if (encoding != NULL) {
134 encoding += 8;
136 encoding = xmlStrstr(content, BAD_CAST"charset =");
137 if (encoding == NULL)
138 encoding = xmlStrstr(content, BAD_CAST"Charset =");
139 if (encoding == NULL)
140 encoding = xmlStrstr(content, BAD_CAST"CHARSET =");
141 if (encoding != NULL)
142 encoding += 9;
144 if (encoding != NULL) {
145 while ((*encoding == ' ') || (*encoding == '\t')) encoding++;
147 return(encoding);
153 * @encoding: the encoding string
155 * Sets the current encoding in the Meta tags
156 * NOTE: this will not change the document content encoding, just
162 htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) {
171 if (encoding != NULL) {
173 (char *)encoding);
213 if (encoding == NULL)
224 if (encoding != NULL) {
237 * encoding informations
362 msg = "unknown encoding %s\n";
450 * @encoding: the document encoding
455 * TODO: if encoding == NULL try to save in the doc encoding
461 xmlNodePtr cur, const char *encoding, int format) {
468 if (encoding != NULL) {
471 enc = xmlParseCharEncoding(encoding);
473 handler = xmlFindCharEncodingHandler(encoding);
480 * Fallback to HTML or ASCII when the encoding is unspecified
493 htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format);
527 const char *encoding;
539 encoding = (const char *) htmlGetMetaEncoding(cur);
541 if (encoding != NULL) {
544 enc = xmlParseCharEncoding(encoding);
555 handler = xmlFindCharEncodingHandler(encoding);
562 handler = xmlFindCharEncodingHandler(encoding);
567 * Fallback to HTML or ASCII when the encoding is unspecified
621 * @encoding: the encoding string
623 * TODO: check whether encoding is needed
629 const char *encoding ATTRIBUTE_UNUSED) {
657 * @encoding: the encoding string
663 encoding ATTRIBUTE_UNUSED) {
719 * @encoding: the encoding string
724 htmlAttrListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur, const char *encoding) {
729 htmlAttrDumpOutput(buf, doc, cur, encoding);
741 * @encoding: the encoding string
748 xmlNodePtr cur, const char *encoding, int format) {
753 htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format);
763 * @encoding: the encoding string
770 xmlNodePtr cur, const char *encoding, int format) {
785 htmlDocContentDumpOutput(buf, (xmlDocPtr) cur, encoding);
789 htmlAttrDumpOutput(buf, doc, (xmlAttrPtr) cur, encoding);
862 htmlAttrListDumpOutput(buf, doc, cur->properties, encoding);
920 htmlNodeListDumpOutput(buf, doc, cur->children, encoding, format);
952 * @encoding: the encoding string
959 xmlNodePtr cur, const char *encoding) {
960 htmlNodeDumpFormatOutput(buf, doc, cur, encoding, 1);
967 * @encoding: the encoding string
974 const char *encoding, int format) {
991 htmlNodeListDumpOutput(buf, cur, cur->children, encoding, format);
1001 * @encoding: the encoding string
1007 const char *encoding) {
1008 htmlDocContentDumpFormatOutput(buf, cur, encoding, 1);
1030 const char *encoding;
1039 encoding = (const char *) htmlGetMetaEncoding(cur);
1041 if (encoding != NULL) {
1044 enc = xmlParseCharEncoding(encoding);
1053 handler = xmlFindCharEncodingHandler(encoding);
1057 handler = xmlFindCharEncodingHandler(encoding);
1062 * Fallback to HTML or ASCII when the encoding is unspecified
1090 const char *encoding;
1098 encoding = (const char *) htmlGetMetaEncoding(cur);
1100 if (encoding != NULL) {
1103 enc = xmlParseCharEncoding(encoding);
1112 handler = xmlFindCharEncodingHandler(encoding);
1119 * Fallback to HTML or ASCII when the encoding is unspecified
1143 * @encoding: the document encoding
1145 * Dump an HTML document to a file using a given encoding.
1151 const char *encoding, int format) {
1161 if (encoding != NULL) {
1164 enc = xmlParseCharEncoding(encoding);
1173 handler = xmlFindCharEncodingHandler(encoding);
1176 htmlSetMetaEncoding(cur, (const xmlChar *) encoding);
1183 * Fallback to HTML or ASCII when the encoding is unspecified
1196 htmlDocContentDumpFormatOutput(buf, cur, encoding, format);
1206 * @encoding: the document encoding
1208 * Dump an HTML document to a file using a given encoding
1214 htmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) {
1215 return(htmlSaveFileFormat(filename, cur, encoding, 1));