X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Ficu_chain.c;h=6aac1c05767203dae3743049cb6c1b4c9cc04799;hp=730eddea1a96217d6b4a7b0f08479fcea3c7b12a;hb=2b35fdfa5fd016e7a0c99b0cd0958c9ce8606ef9;hpb=d05e5d54fcac20824e0efa3d939e5fbb1505964a diff --git a/src/icu_chain.c b/src/icu_chain.c index 730edde..6aac1c0 100644 --- a/src/icu_chain.c +++ b/src/icu_chain.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ @@ -291,7 +291,7 @@ struct icu_chain *icu_chain_xml_config(const xmlNode *xml_node, if (!rule && strcmp((const char *) node->name, "display")) { - yaz_log(YLOG_WARN, "Missing attribute rule for element %s", + yaz_log(YLOG_WARN, "Missing attribute 'rule' for element %s", (const char *) node->name); no_errors++; continue; @@ -346,6 +346,9 @@ struct icu_chain *icu_chain_xml_config(const xmlNode *xml_node, } if (step && U_FAILURE(*status)) { + yaz_log(YLOG_WARN, "ICU Error %d %s for element %s, rule %s", + *status, u_errorName(*status), node->name, rule ? + rule : ""); no_errors++; break; } @@ -567,7 +570,7 @@ void icu_iter_get_org_info(yaz_icu_iter_t iter, size_t *start, size_t *len) int32_t save_len = iter->org->utf16_len; struct icu_buf_utf8 *tmp = icu_buf_utf8_create(0); - UErrorCode status; + UErrorCode status = U_ZERO_ERROR; iter->org->utf16_len = iter->org_start; icu_utf16_to_utf8(tmp, iter->org, &status); @@ -581,6 +584,7 @@ void icu_iter_get_org_info(yaz_icu_iter_t iter, size_t *start, size_t *len) *len = tmp->utf8_len - *start; else *len = 0; + icu_buf_utf8_destroy(tmp); iter->org->utf16_len = save_len; }