Re: [Mingw-users] Problem with setlocale
- Date: Wed, 16 Apr 2008 07:38:50 -0700
- From: Brian Dessent <brian@xxxxxxxxxxx>
- Subject: Re: [Mingw-users] Problem with setlocale
????? wrote:
> I have some problem with setlocale() - when I try to change
> output code page it does not work. I use this example to
> test setlocale():
As I understand it, setlocale() will only change the behavior of string
functions in the C runtime. If you want to change the output codepage
of the current console you need to use SetConsoleOutputCP(), and
likewise with SetConsoleCP() for the input codepage.
> In VS this code work fine.
Visual Studio uses a different/newer version of the C runtime, whereas
MinGW uses the old MSVCRT.DLL as that is the only one that's part of the
operating system and present on any machine without worrying about
redistributables. You can try linking against the newer versions and
see if the behavior is any different.
Brian
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users