Skip to content

Conversation

@Arzaghi
Copy link
Contributor

@Arzaghi Arzaghi commented Sep 24, 2020

Fixes #1121
It's a very simple and probably a temporary solution to this issue. The actual fix should be in the UCRT(I think) and it also needs some modifications in character classification flags. According to This Table, _Ctype._Table[static_cast<unsigned char>('\t')] should be 104 (0x68). But now it returns 40 (0x28) just like the other white-space control codes ('\f','\v','\n','\r'). So, I think there is no direct way to distinguish them without touching the UCRT.
In this fix, I've tried to treat blank as a special case. But some test cases failed in Regex test cases. So, I've made some modifications to the <regex> too.

@StephanTLavavej StephanTLavavej added the bug Something isn't working label Sep 24, 2020
@Arzaghi Arzaghi marked this pull request as ready for review September 27, 2020 01:01
@Arzaghi Arzaghi requested a review from a team as a code owner September 27, 2020 01:01
@StephanTLavavej
Copy link
Member

I believe that there will be a merge conflict with #1307 which is reducing the scope of the extremely short _SP family of macros.

@Arzaghi
Copy link
Contributor Author

Arzaghi commented Oct 2, 2020

I believe that there will be a merge conflict with #1307 which is reducing the scope of the extremely short _SP family of macros.

That's right. Furthermore, I've just found another problem with the last commit. I'm working on it. I'm going to convert it as a draft for now.

Update:
It's impossible to fix this issue without touching UCRT or breaking the ABI by modifying char flags in xlocale 😕

@Arzaghi Arzaghi marked this pull request as draft October 2, 2020 20:04
@StephanTLavavej
Copy link
Member

Update: It's impossible to fix this issue without touching UCRT or breaking the ABI by modifying char flags in xlocale

Ok, thanks for investigating. We're going to close this PR and mark the linked bug as vNext so we can investigate it when ABI breaks are possible.

@Arzaghi Arzaghi deleted the Fix_Issue1121 branch October 7, 2020 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<locale>: std::ctype<char>::blank return true for all space-characters

2 participants