record_conv: change construct prototype
[yaz-moved-to-github.git] / src / icu_transform.c
index 478efa1..164edd6 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) 1995-2012 Index Data
  * See the file LICENSE for details.
  */
 
@@ -60,10 +60,8 @@ 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);
 
@@ -132,10 +130,10 @@ int icu_transform_trans(struct icu_transform * transform,
     if (!icu_buf_utf16_copy(dest16, src16))
         return 0;
 
-    utrans_transUChars (transform->trans, 
-                        dest16->utf16, &(dest16->utf16_len),
-                        dest16->utf16_cap,
-                        0, &(dest16->utf16_len), status);
+    utrans_transUChars(transform->trans, 
+                       dest16->utf16, &(dest16->utf16_len),
+                       dest16->utf16_cap,
+                       0, &(dest16->utf16_len), status);
 
     if (U_FAILURE(*status))
         icu_buf_utf16_clear(dest16);