regex_constants::collate
's effects are inaccurately summarizedSection: 28.6.4.2 [re.synopt] Status: Open Submitter: Stephan T. Lavavej Opened: 2013-09-21 Last modified: 2016-01-28
Priority: 3
View all other issues in [re.synopt].
View all issues with Open status.
Discussion:
The table in 28.6.4.2 [re.synopt]/1 says that regex_constants::collate
"Specifies that character ranges of the form
"[a-b]
" shall be locale sensitive.", but 28.6.12 [re.grammar]/14 says that it affects individual character comparisons
too.
[2012-02-12 Issaquah : recategorize as P3]
Marshall Clow: 28.13/14 only applies to ECMAScript
All: we're unsure
Jonathan Wakely: we should ask John Maddock
Move to P3
[2014-5-14, John Maddock response]
The original intention was the original wording: namely that collate
only made character ranges locale sensitive.
To be frank it's a feature that's probably hardly ever used (though I have no real hard data on that), and is a leftover
from early POSIX standards which required locale sensitive collation for character ranges, and then later changed
to implementation defined if I remember correctly (basically nobody implemented locale-dependent collation).
Z < a
in that locale."
ECMAScript doesn't include collation at all.
IMO, +1 to changing 28.13 instead of 28.5.1. It seems like we'd be on
fairly solid ground if we wanted to remove regex_constants::collate
entirely, in favor of named character classes, but of course that's
not for this issue.
Proposed resolution:
This wording is relative to N3691.
In 28.6.4.2 [re.synopt]/1, Table 138 — "syntax_option_type
effects", change as indicated:
Table 138 — syntax_option_type
effectsElement Effect(s) if set …
collate
Specifies that character ranges of the form "comparisons and character range comparisons shall be locale sensitive.[a-b]
"…