microsoft / microsoft/STL

`<regex>`: What names can and should `regex_traits::lookup_collatename()` recognize?

Open
#5,393 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

decision needed question regex
Dominant language
C++
Stars
11.1k
Forks
1.7k
Avg merge
4d 15h
Merged PRs (30d)
22

Description

The title states this as one question, but it's really two.

First is an actual choice: Should the portable character names in the POSIX standard be recognized and translated bylookup_collatename()?

Cons:

  • These aren't actually names for locale-specific collating elements (which are defined in Chapter 7); they are symbolic names of characters for internal use in the POSIX standard.
  • TR1 was deliberately changed to not mandate that these are recognized by lookup_collatename() (see the end of Section 2 of N1623).

Pro:

  • Boost.Regex and the other standard libraries recognize these names as an extension.
  • After #5392, these names are the final puzzle piece to make a few more libcxx tests pass.

The second question is a technical issue that I don't have an answer to yet: Can we actually access the set of locale-specific (multi-character) collating elements or recognize them in a reasonable way using some Windows API? Or is there some other reasonable approach to recognize locale-specific collating elements like "ch" in Czech or "dzs" in Hungarian?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with regex_traits::lookup_collatename() and review the linked POSIX standard and N1623 discussion about portable character names. Investigate whether Windows APIs expose locale-specific multi-character collating elements, then define which names and collating elements should be recognized and how completion can be tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
localization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.