diff --git a/stl/inc/regex b/stl/inc/regex index 2cfb6d8de33..3c70e9955cd 100644 --- a/stl/inc/regex +++ b/stl/inc/regex @@ -298,11 +298,13 @@ public: } bool isctype(_Elem _Ch, char_class_type _Fx) const { - if (_Fx != static_cast(-1)) { - return _Getctype()->is(_Fx, _Ch); - } else { + if (_Fx == static_cast(_Ch_blank)) { + return _Getctype()->is(_SP, _Ch) || _Getctype()->is(_CN, _Ch); + } else if (_Fx == static_cast(-1)) { return _Ch == '_' // assumes L'_' == '_' || _Getctype()->is(_Ch_alnum, _Ch); + } else { + return _Getctype()->is(_Fx, _Ch); } } diff --git a/stl/inc/xlocale b/stl/inc/xlocale index 3f2a2a488de..d96bb1afd95 100644 --- a/stl/inc/xlocale +++ b/stl/inc/xlocale @@ -2611,6 +2611,9 @@ public: using char_type = _Elem; bool __CLR_OR_THIS_CALL is(mask _Maskval, _Elem _Ch) const { // test if element fits any mask classifications + if (_Maskval == blank) { + return _isblank_l(_Ch, _get_current_locale()) != 0; + } return (_Ctype._Table[static_cast(_Ch)] & _Maskval) != 0; }