projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 5.0.4
[yaz-moved-to-github.git]
/
src
/
icu_chain.c
diff --git
a/src/icu_chain.c
b/src/icu_chain.c
index
730edde
..
5ef9530
100644
(file)
--- a/
src/icu_chain.c
+++ b/
src/icu_chain.c
@@
-291,7
+291,7
@@
struct icu_chain *icu_chain_xml_config(const xmlNode *xml_node,
if (!rule && strcmp((const char *) node->name, "display"))
{
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;
(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))
{
}
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;
}
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);
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);
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;
*len = tmp->utf8_len - *start;
else
*len = 0;
+ icu_buf_utf8_destroy(tmp);
iter->org->utf16_len = save_len;
}
iter->org->utf16_len = save_len;
}