From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31639 invoked by alias); 18 May 2009 14:37:28 -0000 Received: (qmail 31588 invoked by uid 48); 18 May 2009 14:37:15 -0000 Date: Mon, 18 May 2009 14:37:00 -0000 Message-ID: <20090518143715.31587.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/40184] locale(const char* std_name) can create invalid facets for nonuniform locale In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tsyvarev at ispras dot ru" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-05/txt/msg01532.txt.bz2 ------- Comment #2 from tsyvarev at ispras dot ru 2009-05-18 14:37 ------- Yes, this seems reasonably. I also thought about smth. similar to this. Only it is need to take into account using mbsrtowcs for other locale properties(if they exist in others categories). Anyway, checking of mbsrtowcs result could be usefull, at least for terminate resulting string with '\0' if mbsrtowcs cannot convert input string for some reason. E.g., there is a system where mbsrtowcs() cannot convert every non-ASCII character, but all other locale features work correctly. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40184