Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try to move getCollator(type) from WriteCollationData to UCA #793

Open
markusicu opened this issue May 1, 2024 · 1 comment
Open

try to move getCollator(type) from WriteCollationData to UCA #793

markusicu opened this issue May 1, 2024 · 1 comment
Labels

Comments

@markusicu
Copy link
Member

markusicu commented May 1, 2024

If you want a DUCET collator, you can get it from class UCA. But you can also get a cached version from WriteCollationData.

If you want a CLDR collator, you need to call getCollator(type) in class WriteCollationData. That code works with class UCA. In particular, when we were still reordering characters for CLDR (before PR #762), the Remap class for doing so was in class UCA.

This seems misplaced, like an unnecessary back-and-forth. It seems like getCollator(type) should be in class UCA, and WriteCollationData should focus on, well, writing collation data.

A possible alternative is to create a separate class for making a CLDR collator, but there does not seem to be enough special code that we would need that.

So, try to move getCollator(type) from class WriteCollationData to class UCA.

@macchiati FYI

@macchiati
Copy link
Member

macchiati commented May 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants