haskell / text-icu

This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text.
BSD 2-Clause "Simplified" License
47 stars 41 forks source link

Surprising collation sort when using UpperFirst #16

Open robinp opened 9 years ago

robinp commented 9 years ago

I would expect that specifying UpperFirst would sort the capital before the lower, regardless of the following character. Do you have any insight?

:set -XOverloadedStrings
import qualified Data.Text.ICU as ICU
import qualified Data.Text.ICU.Collate as I
ICU.collate (ICU.collatorWith (ICU.Locale "de_DE") [I.CaseFirst (Just I.UpperFirst)]) "muller" "Müller"
-- LT
ICU.collate (ICU.collatorWith (ICU.Locale "de_DE") [I.CaseFirst (Just I.UpperFirst)]) "muller" "Muller"
-- GT