-/* $Id: icu_I18N.c,v 1.21 2007-05-24 10:56:38 adam Exp $
+/* $Id: icu_I18N.c,v 1.22 2007-05-25 13:27:21 marc Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
switch(step->type) {
case ICU_chain_step_type_display:
break;
- case ICU_chain_step_type_norm:
+ case ICU_chain_step_type_index:
break;
- case ICU_chain_step_type_sort:
+ case ICU_chain_step_type_sortkey:
break;
case ICU_chain_step_type_casemap:
step->u.casemap = icu_casemap_create((char *) chain->locale,
switch(step->type) {
case ICU_chain_step_type_display:
break;
- case ICU_chain_step_type_norm:
+ case ICU_chain_step_type_index:
break;
- case ICU_chain_step_type_sort:
+ case ICU_chain_step_type_sortkey:
break;
case ICU_chain_step_type_casemap:
icu_casemap_destroy(step->u.casemap);
(const uint8_t *) "", status);
}
else if (!strcmp((const char *) node->name,
- (const char *) "normal")){
- step = icu_chain_insert_step(chain, ICU_chain_step_type_norm,
+ (const char *) "index")){
+ step = icu_chain_insert_step(chain, ICU_chain_step_type_index,
(const uint8_t *) "", status);
}
else if (!strcmp((const char *) node->name,
- (const char *) "sort")){
- step = icu_chain_insert_step(chain, ICU_chain_step_type_sort,
+ (const char *) "sortkey")){
+ step = icu_chain_insert_step(chain, ICU_chain_step_type_sortkey,
(const uint8_t *) "", status);
}
case ICU_chain_step_type_display:
buf16 = src16;
break;
- case ICU_chain_step_type_norm:
+ case ICU_chain_step_type_index:
buf16 = src16;
break;
- case ICU_chain_step_type_sort:
+ case ICU_chain_step_type_sortkey:
buf16 = src16;
break;
case ICU_chain_step_type_casemap:
case ICU_chain_step_type_display:
icu_utf16_to_utf8(chain->display8, src16, status);
break;
- case ICU_chain_step_type_norm:
+ case ICU_chain_step_type_index:
icu_utf16_to_utf8(chain->norm8, src16, status);
break;
- case ICU_chain_step_type_sort:
+ case ICU_chain_step_type_sortkey:
icu_utf16_to_utf8(chain->sort8, src16, status);
break;
case ICU_chain_step_type_casemap:
-/* $Id: icu_I18N.h,v 1.16 2007-05-21 10:14:08 marc Exp $
+/* $Id: icu_I18N.h,v 1.17 2007-05-25 13:27:21 marc Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
enum icu_chain_step_type {
ICU_chain_step_type_none, //
ICU_chain_step_type_display, // convert to utf8 display format
- ICU_chain_step_type_norm, // convert to utf8 norm format
- ICU_chain_step_type_sort, // convert to utf8 sort format
+ ICU_chain_step_type_index, // convert to utf8 index format
+ ICU_chain_step_type_sortkey, // convert to utf8 sortkey format
ICU_chain_step_type_casemap, // apply utf16 charmap
ICU_chain_step_type_normalize, // apply utf16 normalization
ICU_chain_step_type_tokenize // apply utf16 tokenization
-/* $Id: test_icu_I18N.c,v 1.26 2007-05-24 10:52:36 adam Exp $
+/* $Id: test_icu_I18N.c,v 1.27 2007-05-25 13:27:21 marc Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
"<normalize rule=\"[[:WhiteSpace:][:Punctuation:]] Remove\"/>"
"<display/>"
"<casemap rule=\"l\"/>"
- "<normal/>"
- "<sort/>"
+ "<index/>"
+ "<sortkey/>"
"</icu_chain>";
step = icu_chain_insert_step(chain, ICU_chain_step_type_casemap,
(const uint8_t *) "l",
&status);
- step = icu_chain_insert_step(chain, ICU_chain_step_type_norm,
+ step = icu_chain_insert_step(chain, ICU_chain_step_type_index,
(const uint8_t *)"",
&status);
-/* step = icu_chain_insert_step(chain, ICU_chain_step_type_sort, */
+/* step = icu_chain_insert_step(chain, ICU_chain_step_type_sortkey, */
/* (const uint8_t *)"", */
/* &status); */
"<normalize rule=\"[[:WhiteSpace:][:Punctuation:]] Remove\"/>"
"<display/>"
"<casemap rule=\"l\"/>"
- "<normal/>"
- "<sort/>"
+ "<index/>"
+ "<sortkey/>"
"</icu_chain>";