On 10/11/25 12:32 AM, Grisha Levit wrote:
When using single-byte strings, invalid collating symbols and invalid equivalence classes are treated as the character 0xFF:
-- Without FNM_NOESCAPE, escaping a `[' within a bracket expression usually prevents it from acting as the start of a collating symbol, equivalence class, or character class. However, when parsing the ending point (only) of a range expression, an escaped `[' does not lose its special meaning and can still act as the start of a collating symbol:
-- Another edge case concerns equivalence classes and character classes in a position where they could act as a starting point or ending point of a range expression. In neither case do they actally serve as a range end (as expected). However, there is a difference in behavior depending on their being encountered at the start of or at the end of (what looks like) a range:
Thanks for the detailed analysis and patch.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
