Skip to content

make case insensitive comparisons better #55

Closed

Description

@BurntSushi

We should switch from equality comparison on the first character returned by {upper,lower}case iterators to "does this character match any character in the {upper,lower}case iterator."

Activity

  1. added a commit that references this issue on Mar 11, 2015
  2. SimonSapin commented on Mar 15, 2015

    @SimonSapin
    Contributor

    For what it’s worth, in ES6, a regex with both i (case-insensitive) and u (better Unicode support) flags uses common and simple mappings from Unicode’s CaseFolding.txt. These mapping preserve the number of code points. Using full mapping instead of simple gives “more correct” results, but it can grow the number of code points.

    Either way, case folding (for caseless matching) is not the quite as either lower-case or upper-case.

    I didn’t manage to find a spec for what Perl does exactly (though I didn’t search very hard). The Python documentation is equally unhelpful.

  3. added 3 commits that reference this issue on Apr 19, 2015
    640c579
    7c2e83e
    a3459ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions