+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * Copyright (c) 1997-2016, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
#include "unicode/unistr.h"
#include "unicode/sortkey.h"
#include "allcoll.h"
+#include "cmemory.h"
#include "sfwdchit.h"
#include "../cintltst/calldata.h"
: myCollation(0)
{
/*UErrorCode status = U_ZERO_ERROR;
- UnicodeString rules(TRUE, DEFAULTRULEARRAY, sizeof(DEFAULTRULEARRAY)/sizeof(DEFAULTRULEARRAY[0]));
+ UnicodeString rules(TRUE, DEFAULTRULEARRAY, UPRV_LENGTHOF(DEFAULTRULEARRAY));
UnicodeString newRules("& C < ch, cH, Ch, CH & Five, 5 & Four, 4 & one, 1 & Ampersand; '&' & Two, 2 ");
rules += newRules;
myCollation = new RuleBasedCollator(rules, status);
}
myCollation = new RuleBasedCollator(ruleset, status);
if(U_FAILURE(status)){
- errln("ERROR: in creation of rule based collator from ruleset");
+ errcheckln(status, "ERROR: in creation of rule based collator from ruleset - %s", u_errorName(status));
delete myCollation;
myCollation = 0;
}
default: name = ""; break;
}
} else {
- errln("Collator couldn't be instantiated!");
+ dataerrln("Collator couldn't be instantiated!");
name = "";
}
}