在 2019/10/22 23:43, Maarten Verhage 写道: > Dear list members, > > This might be a naive question. I'm experimenting a bit with different code > pages, locales and fonts (non-console). > > I know about the WinAPI function EnumSystemCodePages to list all the code > pages. Further I can use GetCPInfoEx and look into the CodePageName member > in the CPINFOEX structure to see what name it is. > > Regarding C++ character classification functions like iscntrl, isprint I can > include <locale> and use the std::locale class. As I have mingw-w64: > "x86_64-8.1.0-release-win32-seh-rt_v6-rev0" and my OS is Windows 7, 64bit. > Where can I find all the possible valid code page names for the std::locale > constructor? > > Also I'm curious what happens under-the-hood of an isprint function call. > Will the NLS file, like: "C_1252.NLS" in the Windows\System32 folder > ultimately do the character classification check? Are there WinAPI functions > that also can do the character classification checks? > >
I suspect you are using GCC with libstdc++? The libstdc++ implementation of `std::locale` supports only the C locale on Windows [1] so the only valid locale names are "C" and "" (the empty string). [1] https://github.com/gcc-mirror/gcc/blob/e4c103e5395118b104c0482ca30be80b45ef37be/libstdc%2B%2B-v3/config/locale/generic/c_locale.cc#L220 -- Best regards, LH_Mouse
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
