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

Case and diacritic folding for filter operations #548

Closed
1ec5 opened this issue Oct 21, 2016 · 1 comment
Closed

Case and diacritic folding for filter operations #548

1ec5 opened this issue Oct 21, 2016 · 1 comment

Comments

@1ec5
Copy link
Contributor

1ec5 commented Oct 21, 2016

As discussed in mapbox/mapbox-gl-native#6781, it can often be necessary for a filter to perform a case-insensitive or diacritic-insensitive comparison. Variations on the existing operators should be added to support these options.

Here’s an example design (but by no means the best):

[
  {
    "operator": "in",
    "case-sensitive": false,
    "diacritic-sensitive": false,
  },
  "key",
  "value 1",
  "value 2"
]

Implementing case-insensitive comparisons should be trivial on all the platforms supported by Mapbox GL. On the other hand, while there are fine options for diacritic folding on the native platforms, JavaScript would have to rely on a library for diacritic-insensitive comparisons.

/cc @incanus @lucaswoj @jfirebaugh

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