Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Predefined locale values are missing #1756

Open
Enyium opened this issue Dec 7, 2023 · 3 comments
Open

Predefined locale values are missing #1756

Enyium opened this issue Dec 7, 2023 · 3 comments
Labels
missing enum An enum is missing for constant parameters

Comments

@Enyium
Copy link

Enyium commented Dec 7, 2023

The official docs for GetLocaleInfoW() list a number of constants for the first parameter that aren't in the windows crate.

Maybe it's because the top of the page says GetLocaleInfoEx() should be used instead (by why is the old function available then?). But for that new function, I also found the missing value LOCALE_NAME_USER_DEFAULT.


BTW: The official docs for GetLocaleInfoEx() also contain an easily misunderstood statement, or one that you first have to think of as a documentation error:

The buffer that receives the value must be at least the length of a DWORD value, which is 2.

By "2", they mean 2 wide chars, so 4 bytes.

@riverar riverar added missing api Some documented API is missing from the metadata missing enum An enum is missing for constant parameters and removed missing api Some documented API is missing from the metadata labels Dec 7, 2023
@riverar
Copy link
Collaborator

riverar commented Dec 7, 2023

Missing constants (winnt.h, winnls.h):

#define LOCALE_CUSTOM_DEFAULT                                                 \
          (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_DEFAULT), SORT_DEFAULT))

#define LOCALE_CUSTOM_UNSPECIFIED                                             \
          (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_UNSPECIFIED), SORT_DEFAULT))

#define LOCALE_CUSTOM_UI_DEFAULT                                              \
          (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_UI_CUSTOM_DEFAULT), SORT_DEFAULT))

#define LOCALE_NEUTRAL                                                        \
          (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT))

#define LOCALE_INVARIANT                                                      \
          (MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT))
#define LOCALE_NAME_USER_DEFAULT            NULL
#define LOCALE_NAME_INVARIANT               L""
#define LOCALE_NAME_SYSTEM_DEFAULT          L"!x-sys-default-locale"

@Enyium
Copy link
Author

Enyium commented Dec 7, 2023

And LOCALE_NAME_USER_DEFAULT.

@riverar
Copy link
Collaborator

riverar commented Dec 7, 2023

Thanks, added above!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing enum An enum is missing for constant parameters
Projects
None yet
Development

No branches or pull requests

2 participants