This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] libstdc++/7811


On Friday, September 6, 2002, at 11:38 AM, Benjamin Kosnik wrote:


All there is to it is the environment variable checks and in the
most complex case, some simple string operations to create a composite
name to return for LC_ALL (presuming the C++ interfaces require that
some query for the name of LC_ALL exist).

Agreed. I can work on this improvement soon.
While you're at it, it makes by far the most sense to have locale::name()
return the POSIX format for composite names, i.e. "LC_FOO=x;LC_BAR=y".
Then, at least in GNU, locale::name() returns something that you can
pass to C's setlocale, put in the environment to run other programs
and have them do what you meant, etc.
This is a really good idea. Thanks Roland.
It's not just a good idea, it's the law.  The C++ Standard requires
std::locale::name() and std::setlocale() to use the same format for
composite locales.  This is a nontrivial requirement.

			--Matt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]