[ruby-core:104773] [Ruby master Bug#14137] Windows / MinGW - Regexp - Character Properties - General Category
From:
duerst@...
Date:
2021-08-04 08:05:11 UTC
List:
ruby-core #104773
Issue #14137 has been updated by duerst (Martin Dst).
I agree with @jeremyevans0, but would like to add that
```
ruby -e 'p (/\p{L}/.match("a"))'
```
will produce `#<MatchData "a">` also in any situation that is using UTF-8. That will be on almost all current Linux/Unix,... versions, and also on Windows if you first use the command `chcp 65001`.
----------------------------------------
Bug #14137: Windows / MinGW - Regexp - Character Properties - General Category
https://bugs.ruby-lang.org/issues/14137#change-93109
* Author: MSP-Greg (Greg L)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 2.5.0dev (2017-11-28 trunk 60925) [x64-mingw32]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
While testing RDoc on Appveyor, and the recently 'added' literals.kpeg file, I had several errors across Ruby versions 2.2 thru trunk.
It seems that the `\p{}` constructs listed [here](https://msp-greg.github.io/ruby_trunk/file.regexp.html#label-Character+Properties) under 'General Category' generate an `invalid character property name {**}` error for many of the listed constructs.
Conversely, the constructs listed previously (eg \p{Alpha}, \p{Lower}, \p{Space}, etc) seem to work.
I briefly looked at the regexp tests, and they don't seem to test these.
Are these unavailable on Windows?
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>