Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

cs_CZ collator: incomplete rules #83

Closed
miroslavrehor opened this issue Jun 27, 2018 · 1 comment
Closed

cs_CZ collator: incomplete rules #83

miroslavrehor opened this issue Jun 27, 2018 · 1 comment

Comments

@miroslavrehor
Copy link

collator = icu.Collator.createInstance(icu.Locale('cs_CZ'))
print collator.__str__()
returns: &C<č<<<Č&H<ch<<<cH<<<Ch<<<CH&R<ř<<<Ř&S<š<<<Š&Z<ž<<<Ž

However, many rules are missing. The correct ordering should be:
&A<á<<<Á&C<č<<<Č&D<ď<<<Ď&E<é<<<É&H<ch<<<cH<<<Ch<<<CH&I<í<<<Í&N<ň<<<Ň&O<ó<<<Ó&R<ř<<<Ř&S<š<<<Š&T<ť<<<Ť&U<ú<<<Ú&Y<ý<<<Ý&Ú<ů<<<Ů&Z<ž<<<Ž

@ovalhub
Copy link
Owner

ovalhub commented Jun 29, 2018

I'm not sure what to tell you: str(collator) returns collator.getRules().
For me:
on Python 2.7:

collator = icu.Collator.createInstance(icu.Locale('cs_CZ'))
collator.getRules()
u'&C<c\u030c<<<C\u030c&H<ch<<<cH<<<Ch<<<CH&R<r\u030c<<<R\u030c&S<s\u030c<<<S\u030c&Z<z\u030c<<<Z\u030c'
unicode(collator)
u'&C<c\u030c<<<C\u030c&H<ch<<<cH<<<Ch<<<CH&R<r\u030c<<<R\u030c&S<s\u030c<<<S\u030c&Z<z\u030c<<<Z\u030c'
on Python 3:
collator = icu.Collator.createInstance(icu.Locale('cs_CZ'))
str(collator)
'&C<c\u030c<<<C\u030c&H<ch<<<cH<<<Ch<<<CH&R<r\u030c<<<R\u030c&S<s\u030c<<<S\u030c&Z<z\u030c<<<Z\u030c'

If that's not all the rules you expect, please contact the ICU users list.

@ovalhub ovalhub closed this as completed Jun 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants