$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [boost[program options] locale support
From: Artyom (artyomtnk_at_[hidden])
Date: 2010-06-21 08:01:09
>
> Is it common to use different locales for different files?
>
It is very uncommon to use global locale as... about half of
programs will be broken as they not locale-aware.
(example boost::lexical_cast<std::string>(1024)=="1.024",
many developers would not expect this)
On the other hand when locale is used it would be imbued by default
to the newly created io-stream.
Additional point is the fact that there are may be many C++ locale
instances unlike the case of C locales.
So the **right** thing to do:
1. Use iostream's locale if you use stream
2. Use your own locale and provide imbue()/getloc() option as
io-stream does.
Artyom