Add yaz_parse_facet_list with helper functions
[yaz-moved-to-github.git] / src / icu_transform.c
index b7ae9c3..4e3036d 100644 (file)
@@ -37,7 +37,7 @@ struct icu_transform *icu_transform_clone(struct icu_transform *old)
 {
     struct icu_transform *transform
         = (struct icu_transform *) xmalloc(sizeof(struct icu_transform));
-    UErrorCode status;
+    UErrorCode status = U_ZERO_ERROR;
     assert(old);
     transform->action = old->action;
     assert(old->trans);
@@ -60,7 +60,10 @@ struct icu_transform * icu_transform_create(const char *id, char action,
     transform->trans = 0;
 
     if (id)
+    {
         icu_utf16_from_utf8_cstr(id16, id, status);
+        id16->utf16[id16->utf16_len] = 0;
+    }
     if (rules)
         icu_utf16_from_utf8_cstr(rules16, rules, status);