
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Noah Roberts Sent: Friday, April 15, 2011 8:43 PM To: boost@lists.boost.org Subject: Re: [boost] [locale] Strange(?) result in example code
On 4/15/2011 12:38 PM, Artyom wrote:
std::cout.imbue(std::locale()); // Now global locale imbued to stream as well.
LOL, DUH! OK. Thanks.
Well join the club - I've fallen into this pit recently :-( Am I correct in thinking that the reason is that std::cout is constructed *before* the new locale is 'globalled'? And so std::cerr needs imbuing too but that fstream and stringstreams constructed after the std::locale::global("en_US.UTF-8") statement will get the new locale? Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com