X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Thu, 9 Feb 2012 16:26:34 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: how to set locale with C++
Message-ID: <20120209152634.GM23330@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <4F33AA60.6080704@gmail.com> <20120209123738.GG23330@calimero.vinschen.de> <4F33D71A.9040105@gmail.com> <CAKw7uVg1U06aoCL9xb-x27ztFmOiwACEAf0G55w0V3xzoH5ZRg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAKw7uVg1U06aoCL9xb-x27ztFmOiwACEAf0G55w0V3xzoH5ZRg@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Feb  9 16:22, Václav Zeman wrote:
> On 9 February 2012 15:24, marco atzeri wrote:
> > it could be related to libstdc++ built with a different
> > --enable-clocale option ?
> The problem is that Cygwin/newlib does not have good enough locale
> support.  C99 locale support is not good enough for std::locale
> implementation.  Mainly because the functions that change the locale
> affect the whole process.  It is necessary to have at least per thread
> locale for std::locale to be implementable; it is better to have some
> sort of locale structure to pass around.  AFAIK this can be
> implemented using functions provided by xlocale.h (MacOS X, [1]).

I'd prefer to have per-thread locale support as required by SUSv4.
However, it's a lot of work and http://cygwin.com/acronyms/#SHTDI


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

