How do i get information about language settings, codepageinfo from WINAPI?

손 상현 20 Reputation points
2024-06-16T05:17:21.4566667+00:00

I'm trying to get information about the Windows language settings.

In Windows 11, how can I get information about the language settings on Windows and what information do I need to get?

I've found "winnls.h", and am referencing it but i have a question.

with "Beta: Use Unicode UTF-8 for worldwide language support" checked,

The code page number value obtained with GetACP() is different from the code page number value obtained with GetLocaleInfoEx(LOCALE_NAME_SYSTEM_DEFAULT, LOCALE_IDEFAULTCODEPAGE, ... ), which information should I follow?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,493 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,763 questions
0 comments No comments
{count} votes

Accepted answer
  1. Xiaopo Yang - MSFT 12,151 Reputation points Microsoft Vendor
    2024-06-17T01:34:47.1766667+00:00

    Hello @손 상현,

    GetACP function Retrieves the current Windows ANSI code page identifier for the operating system.

    LOCALE_IDEFAULTCODEPAGE means the default oem code page for locale.

    LOCALE_IDEFAULTANSICODEPAGE means the default ansi code page for locale.

    GetACP and LOCALE_IDEFAULTANSICODEPAGE retrieve the same code page identifier for me.

    User's image


0 additional answers

Sort by: Most helpful