Collator::getTailoredSet() requires & parses rule string

Description

Collator::getTailoredSet() requires that the collator has a rule string, and it parses that rule string to find the set of tailored characters and contractions. It also uses the CanonicalIterator on each item.

This does not work for users who remove the rule strings from the data (because the rule strings can be large and are otherwise rarely useful).

It also seems very inefficient. It seems like the code should enumerate the already-built mapping data and report which characters and contractions have mappings.

Worse, the behavior of getTailoredSet() and the actual builder code can get out of sync, which can lead to incorrect results.

Activity

Show:
TracBot
July 1, 2018, 9:55 AM
Trac Comment 1 by —2012-09-23T05:13:29.229Z

Same for ucol_getContractions() and ucol_getContractionsAndExpansions().

TracBot
July 1, 2018, 9:55 AM
Trac Comment 3 by —2013-10-25T20:52:20.319Z

"collv2" enumerates the data structure

Fixed

Assignee

Markus Scherer

Reporter

Markus Scherer

Components

Labels

Reviewer

None

Priority

minor

Time Needed

Days

Fix versions