version 1.24, 2000/07/11 23:12:32
|
version 1.25, 2000/07/12 13:46:54
|
Line 155 found_content:
|
Line 155 found_content:
|
} |
} |
if (encoding != NULL) { |
if (encoding != NULL) { |
while ((*encoding == ' ') || (*encoding == '\t')) encoding++; |
while ((*encoding == ' ') || (*encoding == '\t')) encoding++; |
fprintf(stderr, "Autodetected encoding %s\n", encoding); |
|
} |
} |
return(encoding); |
return(encoding); |
} |
} |
Line 317 htmlNodeDump(xmlBufferPtr buf, xmlDocPtr
|
Line 316 htmlNodeDump(xmlBufferPtr buf, xmlDocPtr
|
if (cur->content != NULL) { |
if (cur->content != NULL) { |
xmlChar *buffer; |
xmlChar *buffer; |
|
|
/* uses the HTML encoding routine !!!!!!!!!! */ |
|
#ifndef XML_USE_BUFFER_CONTENT |
#ifndef XML_USE_BUFFER_CONTENT |
buffer = xmlEncodeEntitiesReentrant(doc, cur->content); |
buffer = xmlEncodeEntitiesReentrant(doc, cur->content); |
#else |
#else |
Line 647 htmlNodeDumpOutput(xmlOutputBufferPtr bu
|
Line 645 htmlNodeDumpOutput(xmlOutputBufferPtr bu
|
} |
} |
if (cur->type == HTML_TEXT_NODE) { |
if (cur->type == HTML_TEXT_NODE) { |
if (cur->content != NULL) { |
if (cur->content != NULL) { |
#if 0 |
|
xmlChar *buffer; |
xmlChar *buffer; |
|
|
/* @@@@@ uses the HTML encoding routine !!!!!!!!!! */ |
|
#ifndef XML_USE_BUFFER_CONTENT |
#ifndef XML_USE_BUFFER_CONTENT |
buffer = xmlEncodeEntitiesReentrant(doc, cur->content); |
buffer = xmlEncodeEntitiesReentrant(doc, cur->content); |
#else |
#else |
Line 658 htmlNodeDumpOutput(xmlOutputBufferPtr bu
|
Line 654 htmlNodeDumpOutput(xmlOutputBufferPtr bu
|
xmlBufferContent(cur->content)); |
xmlBufferContent(cur->content)); |
#endif |
#endif |
if (buffer != NULL) { |
if (buffer != NULL) { |
xmlOutputBufferWriteString(buf, buffer); |
xmlOutputBufferWriteString(buf, (const char *)buffer); |
xmlFree(buffer); |
xmlFree(buffer); |
} |
} |
#else |
|
/* |
|
* Uses the OutputBuffer property to automatically convert |
|
* invalids to charrefs |
|
*/ |
|
|
|
#ifndef XML_USE_BUFFER_CONTENT |
|
xmlOutputBufferWriteString(buf, (const char *) cur->content); |
|
#else |
|
xmlOutputBufferWriteString(buf, |
|
(const char *) xmlBufferContent(cur->content)); |
|
#endif |
|
#endif |
|
} |
} |
return; |
return; |
} |
} |
Line 863 htmlDocDump(FILE *f, xmlDocPtr cur) {
|
Line 846 htmlDocDump(FILE *f, xmlDocPtr cur) {
|
} |
} |
|
|
/* |
/* |
* Fallback to ASCII when the encoding is unspecified |
* Fallback to HTML or ASCII when the encoding is unspecified |
*/ |
*/ |
if (handler == NULL) |
if (handler == NULL) |
|
handler = xmlFindCharEncodingHandler("HTML"); |
|
if (handler == NULL) |
handler = xmlFindCharEncodingHandler("ascii"); |
handler = xmlFindCharEncodingHandler("ascii"); |
|
|
buf = xmlOutputBufferCreateFile(f, handler); |
buf = xmlOutputBufferCreateFile(f, handler); |
Line 913 htmlSaveFile(const char *filename, xmlDo
|
Line 898 htmlSaveFile(const char *filename, xmlDo
|
} |
} |
|
|
/* |
/* |
* Fallback to ASCII when the encoding is unspecified |
* Fallback to HTML or ASCII when the encoding is unspecified |
*/ |
*/ |
if (handler == NULL) |
if (handler == NULL) |
|
handler = xmlFindCharEncodingHandler("HTML"); |
|
if (handler == NULL) |
handler = xmlFindCharEncodingHandler("ascii"); |
handler = xmlFindCharEncodingHandler("ascii"); |
|
|
|
|
/* |
/* |
* save the content to a temp buffer. |
* save the content to a temp buffer. |
*/ |
*/ |
Line 965 htmlSaveFileEnc(const char *filename, xm
|
Line 951 htmlSaveFileEnc(const char *filename, xm
|
} |
} |
|
|
/* |
/* |
* Fallback to ASCII when the encoding is unspecified |
* Fallback to HTML or ASCII when the encoding is unspecified |
*/ |
*/ |
if (handler == NULL) |
if (handler == NULL) |
|
handler = xmlFindCharEncodingHandler("HTML"); |
|
if (handler == NULL) |
handler = xmlFindCharEncodingHandler("ascii"); |
handler = xmlFindCharEncodingHandler("ascii"); |
|
|
/* |
/* |