Home | History | Annotate | Download | only in libxml2

Lines Matching full:handler

1289  * parser internals, so the default encoding handler is NULL
1308 xmlCharEncodingHandlerPtr handler;
1341 * allocate and fill-up an handler block.
1343 handler = (xmlCharEncodingHandlerPtr)
1345 if (handler == NULL) {
1350 handler->input = input;
1351 handler->output = output;
1352 handler->name = up;
1355 handler->iconv_in = NULL;
1356 handler->iconv_out = NULL;
1359 handler->uconv_in = NULL;
1360 handler->uconv_out = NULL;
1364 * registers and returns the handler.
1366 xmlRegisterCharEncodingHandler(handler);
1369 "Registered encoding handler for %s\n", name);
1371 return(handler);
1462 * @handler: the xmlCharEncodingHandlerPtr handler block
1464 * Register the char encoding handler, surprising, isn't it ?
1467 xmlRegisterCharEncodingHandler(xmlCharEncodingHandlerPtr handler) {
1469 if (handler == NULL) {
1471 "xmlRegisterCharEncodingHandler: NULL handler !\n", NULL);
1477 "xmlRegisterCharEncodingHandler: Too many handler registered, see %s\n",
1481 handlers[nbCharEncodingHandler++] = handler;
1488 * Search in the registered set the handler able to read/write that encoding.
1490 * Returns the handler or NULL if not found
1494 xmlCharEncodingHandlerPtr handler;
1509 handler = xmlFindCharEncodingHandler("EBCDIC");
1510 if (handler != NULL) return(handler);
1511 handler = xmlFindCharEncodingHandler("ebcdic");
1512 if (handler != NULL) return(handler);
1515 handler = xmlFindCharEncodingHandler("ISO-10646-UCS-4");
1516 if (handler != NULL) return(handler);
1517 handler = xmlFindCharEncodingHandler("UCS-4");
1518 if (handler != NULL) return(handler);
1519 handler = xmlFindCharEncodingHandler("UCS4");
1520 if (handler != NULL) return(handler);
1523 handler = xmlFindCharEncodingHandler("ISO-10646-UCS-4");
1524 if (handler != NULL) return(handler);
1525 handler = xmlFindCharEncodingHandler("UCS-4");
1526 if (handler != NULL) return(handler);
1527 handler = xmlFindCharEncodingHandler("UCS4");
1528 if (handler != NULL) return(handler);
1535 handler = xmlFindCharEncodingHandler("ISO-10646-UCS-2");
1536 if (handler != NULL) return(handler);
1537 handler = xmlFindCharEncodingHandler("UCS-2");
1538 if (handler != NULL) return(handler);
1539 handler = xmlFindCharEncodingHandler("UCS2");
1540 if (handler != NULL) return(handler);
1550 handler = xmlFindCharEncodingHandler("ISO-8859-1");
1551 if (handler != NULL) return(handler);
1554 handler = xmlFindCharEncodingHandler("ISO-8859-2");
1555 if (handler != NULL) return(handler);
1558 handler = xmlFindCharEncodingHandler("ISO-8859-3");
1559 if (handler != NULL) return(handler);
1562 handler = xmlFindCharEncodingHandler("ISO-8859-4");
1563 if (handler != NULL) return(handler);
1566 handler = xmlFindCharEncodingHandler("ISO-8859-5");
1567 if (handler != NULL) return(handler);
1570 handler = xmlFindCharEncodingHandler("ISO-8859-6");
1571 if (handler != NULL) return(handler);
1574 handler = xmlFindCharEncodingHandler("ISO-8859-7");
1575 if (handler != NULL) return(handler);
1578 handler = xmlFindCharEncodingHandler("ISO-8859-8");
1579 if (handler != NULL) return(handler);
1582 handler = xmlFindCharEncodingHandler("ISO-8859-9");
1583 if (handler != NULL) return(handler);
1588 handler = xmlFindCharEncodingHandler("ISO-2022-JP");
1589 if (handler != NULL) return(handler);
1592 handler = xmlFindCharEncodingHandler("SHIFT-JIS");
1593 if (handler != NULL) return(handler);
1594 handler = xmlFindCharEncodingHandler("SHIFT_JIS");
1595 if (handler != NULL) return(handler);
1596 handler = xmlFindCharEncodingHandler("Shift_JIS");
1597 if (handler != NULL) return(handler);
1600 handler = xmlFindCharEncodingHandler("EUC-JP");
1601 if (handler != NULL) return(handler);
1609 "No handler found for encoding %d\n", enc);
1618 * Search in the registered set the handler able to read/write that encoding.
1620 * Returns the handler or NULL if not found
1663 "Found registered handler for encoding %s\n", name);
1693 "Found iconv handler for encoding %s\n", name);
1720 "Found ICU converter handler for encoding %s\n", name);
1733 "No handler found for encoding %s\n", name);
1895 * @handler: char enconding transformation data structure
1899 * Front-end for the encoding handler input function, but handle only
1908 xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out,
1914 if (handler == NULL) return(-1);
1934 if (handler->input != NULL) {
1935 ret = handler->input(&out->content[out->use], &written,
1942 else if (handler->iconv_in != NULL) {
1943 ret = xmlIconvWrapper(handler->iconv_in, &out->content[out->use],
1952 else if (handler->uconv_in != NULL) {
1953 ret = xmlUconvWrapper(handler->uconv_in, 1, &out->content[out->use],
1994 * @handler: char encoding transformation data structure
1998 * Generic front-end for the encoding handler input function
2006 xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
2013 if (handler == NULL)
2028 if (handler->input != NULL) {
2029 ret = handler->input(&out->content[out->use], &written,
2036 else if (handler->iconv_in != NULL) {
2037 ret = xmlIconvWrapper(handler->iconv_in, &out->content[out->use],
2047 else if (handler->uconv_in != NULL) {
2048 ret = xmlUconvWrapper(handler->uconv_in, 1, &out->content[out->use],
2101 * @handler: char enconding transformation data structure
2105 * Generic front-end for the encoding handler output function
2118 xmlCharEncOutFunc(xmlCharEncodingHandler *handler, xmlBufferPtr out,
2126 if (handler == NULL) return(-1);
2141 if (handler->output != NULL) {
2142 ret = handler->output(&out->content[out->use], &written,
2150 else if (handler->iconv_out != NULL) {
2151 ret = xmlIconvWrapper(handler->iconv_out, &out->content[out->use],
2158 else if (handler->uconv_out != NULL) {
2159 ret = xmlUconvWrapper(handler->uconv_out, 0,
2183 if (handler->output != NULL) {
2184 ret = handler->output(&out->content[out->use], &written,
2194 else if (handler->iconv_out != NULL) {
2195 ret = xmlIconvWrapper(handler->iconv_out, &out->content[out->use],
2213 else if (handler->uconv_out != NULL) {
2214 ret = xmlUconvWrapper(handler->uconv_out, 0,
2311 * @handler: char enconding transformation data structure
2313 * Generic front-end for encoding handler close function
2318 xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) {
2320 if (handler == NULL) return(-1);
2321 if (handler->name == NULL) return(-1);
2327 if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) {
2328 if (handler->name != NULL)
2329 xmlFree(handler->name);
2330 handler->name = NULL;
2331 if (handler->iconv_out != NULL) {
2332 if (iconv_close(handler->iconv_out))
2334 handler->iconv_out = NULL;
2336 if (handler->iconv_in != NULL) {
2337 if (iconv_close(handler->iconv_in))
2339 handler->iconv_in = NULL;
2341 xmlFree(handler);
2345 if ((handler->uconv_out != NULL) || (handler->uconv_in != NULL)) {
2346 if (handler->name != NULL)
2347 xmlFree(handler->name);
2348 handler->name = NULL;
2349 if (handler->uconv_out != NULL) {
2350 closeIcuConverter(handler->uconv_out);
2351 handler->uconv_out = NULL;
2353 if (handler->uconv_in != NULL) {
2354 closeIcuConverter(handler->uconv_in);
2355 handler->uconv_in = NULL;
2357 xmlFree(handler);
2363 "failed to close the encoding handler\n");
2366 "closed the encoding handler\n");
2395 xmlCharEncodingHandler * handler = in->buf->encoder;
2408 if (handler->output != NULL) {
2412 ret = handler->output(&convbuf[0], &written,
2419 } else if (handler->iconv_out != NULL) {
2423 ret = xmlIconvWrapper(handler->iconv_out, &convbuf[0],
2436 } else if (handler->uconv_out != NULL) {
2440 ret = xmlUconvWrapper(handler->uconv_out, 0, &convbuf[0],