Ticket #1506 (closed feature request: wontfix)
Case-insensitive char/string comparison
| Reported by: | Eelis | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Not GHC |
| Component: | libraries/base | Version: | 6.6.1 |
| Keywords: | Cc: | pho@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
Data.Char provides functions to convert case, but does not provide a function to perform case-insensitive char/string comparison. Note that such functionality cannot be obtained by simply comparing for equality after performing toUpper/toLower, because some languages have things like multiple lowercase characters corresponding to the same uppercase character.
For example, in Greek, converting either σ or ς to uppercase yields Σ, while the inverse always yields σ. Consequently, the convert-all-to-uppercase approach would produce a false positive when comparing σ to ς, and the convert-all-to-lowercase approach would produce a false negative when comparing Σ to ς.
