[libcxx-commits] [PATCH] D91137: [5/N] [libcxx] Convert paths to/from the right narrow code page for narrow strings on windows

Adrian McCarthy via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 16 14:38:09 PST 2020


amccarth added a comment.

The Windows details look correct, though I have a couple questions on the code page conversions.



================
Comment at: libcxx/src/filesystem/operations.cpp:1675
+  ErrorHandler<size_t> err("__wide_to_char", nullptr);
+  UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
+  BOOL used_default = FALSE;
----------------
I'm not clear on what AreFileApisANSI does, nor have I found it using code search.  In what case would any APIs use the OEM code page when the user's code page is something else?

I'm also wondering whether CP_ACP should be CP_THREAD_ACP, which, by default, will be the user's current code page which could be different than the system code page.


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

https://reviews.llvm.org/D91137



More information about the libcxx-commits mailing list