-// const UnicodeString& defRules = ((RuleBasedCollator*)myCollation)->getRules();
- status = U_ZERO_ERROR;
- tblColl1 = new RuleBasedCollator(((RuleBasedCollator*)myCollation)->getRules(), status);
- if (U_FAILURE(status))
- {
- UnicodeString msg, name;
-
- msg += "Recreate ";
- msg += locales[i].getDisplayName(name);
- msg += "collation failed.";
-
- errln(msg);
- continue;
+ const UnicodeString &rules = ((RuleBasedCollator*)myCollation.getAlias())->getRules();
+ if (rules.isEmpty() &&
+ (locale == Locale::getCanadaFrench() || locale == Locale::getJapanese())) {
+ dataerrln("%s Collator missing rule string", locale.getName());
+ if (logKnownIssue("10671", "TestG7Locales does not test ignore-punctuation")) {
+ continue;
+ }
+ } else {
+ status = U_ZERO_ERROR;
+ RuleBasedCollator *tblColl1 = new RuleBasedCollator(rules, status);
+ if (U_FAILURE(status)) {
+ errln("Recreate %s collation failed - %s", locale.getName(), u_errorName(status));
+ continue;
+ }
+ myCollation.adoptInstead(tblColl1);