From 28e701c0d61bec52e20b33eb9b8d14e07c32636e Mon Sep 17 00:00:00 2001 From: Stuart Gill Date: Fri, 3 Feb 2012 01:10:19 +0000 Subject: [PATCH] ICU-9095 fix for reorder rules mixed with other rules - better solution X-SVN-Rev: 31313 --- icu4c/source/i18n/ucol_res.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/icu4c/source/i18n/ucol_res.cpp b/icu4c/source/i18n/ucol_res.cpp index cf3dfa16a4c..0a3d8dbbdda 100644 --- a/icu4c/source/i18n/ucol_res.cpp +++ b/icu4c/source/i18n/ucol_res.cpp @@ -435,7 +435,7 @@ ucol_openRulesForImport( const UChar *rules, } /* if we have a set of rules, let's make something of it */ - if(src.resultLen > 0 || src.removeSet != NULL || src.reorderCodesLength > 0) { + if(src.resultLen > 0 || src.removeSet != NULL) { /* also, if we wanted to remove some contractions, we should make a tailoring */ table = ucol_assembleTailoringTable(&src, status); if(U_SUCCESS(*status)) { @@ -451,7 +451,6 @@ ucol_openRulesForImport( const UChar *rules, if (U_FAILURE(*status)) { goto cleanup; } - ucol_setReorderCodesFromParser(result, &src, status); result->hasRealData = TRUE; result->freeImageOnClose = TRUE; } @@ -477,6 +476,8 @@ ucol_openRulesForImport( const UChar *rules, result->freeImageOnClose = FALSE; } + ucol_setReorderCodesFromParser(result, &src, status); + if(U_SUCCESS(*status)) { UChar *newRules; result->dataVersion[0] = UCOL_BUILDER_VERSION; -- 2.40.0