I'm attempting to get a collator that gives me a case-insensitive, accent-sensitive locale, but with a twist - whitespace sensitivity.
I thought maybe I could do this via a `ucol_open` on the base locale I'm interested in "en-u-ks-level2", and then ask for whatever tailoring it may have via `col_getRules`. Then, I append my tailoring I'm after to the returned rules with `& \u0020 < \u00a0` (for example) and then re-open the collator with `ucol_openRules`, but this gives me a collator with only the tailoring rule I've supplied against the default collation.
I will admit, though, that " See https://www.unicode.org/charts/collation/ and click "Whitespace" on the left." is a little confusing to me. I'm not exactly an expert and that chart has left me scratching my head. :D
Just to confirm - a -u-ks-level2 collation will treat a space and a non-breaking space as different?
What I'm trying to do is create a collation where everything is distinct _except_ case.Is such a thing possible?
--
You received this message because you are subscribed to the Google Groups "icu-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to icu-support...@unicode.org.
To view this discussion visit https://groups.google.com/a/unicode.org/d/msgid/icu-support/b06ca0a8-3a75-4138-8e3d-80f902eb3c0en%40unicode.org.
... it confirms (to no one's suprrise) what Markus has pointed out. I am trying to create a difference at a level that is explicitly ignored, it seems. As soon as you no longer are interested in case, the differences in whitespace also seem to fall away.
--
You received this message because you are subscribed to the Google Groups "icu-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to icu-support...@unicode.org.
To view this discussion visit https://groups.google.com/a/unicode.org/d/msgid/icu-support/CAN49p6oNrkTLmViLOjrZ8EgpWSaJM8%2BbKZfrtBDgk8%2B-jHW9PQ%40mail.gmail.com.--
You received this message because you are subscribed to the Google Groups "ICU - Team" group.
To unsubscribe from this group and stop receiving emails from it, send an email to icu-team+u...@unicode.org.
To view this discussion visit https://groups.google.com/a/unicode.org/d/msgid/icu-team/CAN49p6oNrkTLmViLOjrZ8EgpWSaJM8%2BbKZfrtBDgk8%2B-jHW9PQ%40mail.gmail.com.
I can't seem to make that work properly with ucol_openRules, though? Like, how does one apply this in a rule? I had thought it might be "[strength 2] & <tailoring rules here>" but it seems to not shift to something like a "ks-level2" locale collation.
Did you pass UCOL_DEFAULT into the UCollationStrength argument of ucol_openRules() (fourth argument)?If not, then that overrides what the rules say.