X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ficu_transform.c;h=164edd6d192604fa58749b68795aae1d05384044;hb=03dccce903176e61f889b1558834aa5a09f9f8c0;hp=0d75ff7b7ec9b3b123d3d1aa0b33c34392d66881;hpb=b71d00d4e1c65d134664f37502d62fcfa8136d76;p=yaz-moved-to-github.git diff --git a/src/icu_transform.c b/src/icu_transform.c index 0d75ff7..164edd6 100644 --- a/src/icu_transform.c +++ b/src/icu_transform.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2012 Index Data * See the file LICENSE for details. */ @@ -61,6 +61,7 @@ struct icu_transform * icu_transform_create(const char *id, char action, if (id) icu_utf16_from_utf8_cstr(id16, id, status); + if (rules) icu_utf16_from_utf8_cstr(rules16, rules, status); @@ -129,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);