Fix icu_iter_get_norm returns invalid size for some input YAZ-834
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 30 Mar 2015 14:16:48 +0000 (16:16 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 30 Mar 2015 14:16:48 +0000 (16:16 +0200)
The icu_iter_get_org_info returns information based on string
as it appears on tokenize step.

src/icu_chain.c

index b672975..d0a2857 100644 (file)
@@ -426,6 +426,8 @@ struct icu_buf_utf16 *icu_iter_invoke(yaz_icu_iter_t iter,
                 struct icu_buf_utf16 *src = dst;
 
                 icu_tokenizer_attach(step->u.tokenizer, src, &iter->status);
+                iter->utf8_base = iter->utf16_base = 0;
+                icu_buf_utf16_copy(iter->org, src);
                 icu_buf_utf16_destroy(src);
             }
             dst = icu_buf_utf16_create(0);