[libcxx-commits] [PATCH] D120796: [libcxx] Fix the ctype `is` (pointer version) function for Windows

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 2 06:08:09 PST 2022


mstorsjo added inline comments.


================
Comment at: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp:110-112
+            // On Windows, in the "C" locale, \x00DA is interpreted according
+            // to the current code page, where this char can be considered an
+            // uppercase alphabetical character.
----------------
Quuxplusone wrote:
> This comment is too vague for my liking. I infer that "can be" means sometimes it is and sometimes it isn't. I'd rather see something very specific, like
> ```
> // On Windows, this depends on the current codepage.
> // If the codepage is CP-437, \x00DA is U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT.
> // If the codepage is CP-1252, \x00DA is U+00DA CAPITAL LETTER U WITH ACUTE.
> ```
> And then I'm not actually sure why the non-Windows behavior claims that U+00DA is //not// alpha+upper.
I think in the non-Windows case, the "C" locale might correspond to plain ASCII or something like that, where `\x00DA` isn't considered an alphabetical character.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120796/new/

https://reviews.llvm.org/D120796



More information about the libcxx-commits mailing list