RE: extracting code page of current locale

From: Rick Cameron (
Date: Thu Feb 12 2004 - 15:23:17 EST

  • Next message: Philippe Verdy: "Re: extracting code page of current locale"

    The function setlocale is a CRT function; GetACP (and other candidates like
    GetUserDefaultLCID) is a Win32 function - and ne'er the twain shall meet!

    Setting the CRT's locale using setlocale will not, I believe, change the OS
    current user locale, and vice versa.

    My advice: shun the CRT's locale-related functions like the spawn of Satan.
    Use the Win32 functions exclusively.

    Good luck

    - rick cameron

    -----Original Message-----
    From: [] On
    Behalf Of Markus Scherer
    Sent: February 12, 2004 10:50
    To: unicode
    Subject: Re: extracting code page of current locale

    Deepak Chand Rathore wrote:
    > Is there a way to extract the code page of the current program locale
    > in windows( in c++, vc compiler) (set by a call to setlocale function).

    Try GetACP().

    This archive was generated by hypermail 2.1.5 : Thu Feb 12 2004 - 16:03:30 EST