| 381 | ************************************************************************/ |
| 382 | |
| 383 | static xmlCharEncodingHandler * |
| 384 | htmlFindOutputEncoder(const char *encoding) { |
| 385 | xmlCharEncodingHandler *handler = NULL; |
| 386 | |
| 387 | if (encoding != NULL) { |
| 388 | int res; |
| 389 | |
| 390 | res = xmlOpenCharEncodingHandler(encoding, /* output */ 1, |
| 391 | &handler); |
| 392 | if (res != XML_ERR_OK) |
| 393 | htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding); |
| 394 | } else { |
| 395 | /* |
| 396 | * Fallback to HTML when the encoding is unspecified |
| 397 | */ |
| 398 | xmlOpenCharEncodingHandler("HTML", /* output */ 1, &handler); |
| 399 | } |
| 400 | |
| 401 | return(handler); |
| 402 | } |
| 403 | |
| 404 | /** |
| 405 | * htmlBufNodeDumpFormat: |
no test coverage detected