Win32 os locale

Win32 os locale

Post by Andy Coate » Thu, 23 Dec 2004 21:10:27


I'm sure this has been asked before, but is there anyway to hook up the
Win32 regional settings (set via the OS's control panel applet) to the stl
stream classes?

I would like std::wstringstream and its fellows to pick up things like the
decimal place character and thousand seperator from the OS.

Thanks

Andy
 
 
 

Win32 os locale

Post by Darko Mile » Sat, 25 Dec 2004 01:48:39


Take a look at std::locale class and facet's.

 
 
 

Win32 os locale

Post by Steven Ric » Fri, 14 Jan 2005 13:33:59


I believe you set

std::locale::global(""); // this sets the global locale to be transparent

and then everywhere you use the "std::locale::empty()" to get the
currently set global locale to be used in any place that wants a locale.

Steven
 
 
 

Win32 os locale

Post by Andy Coate » Sun, 27 Feb 2005 03:17:15

Excellent - thanks - I'll give that a go.