From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3362 invoked by alias); 19 Feb 2009 15:20:27 -0000 Received: (qmail 3305 invoked by uid 48); 19 Feb 2009 15:20:08 -0000 Date: Thu, 19 Feb 2009 15:20:00 -0000 Subject: [Bug libstdc++/39243] New: Invalid thousands separator in russian locale X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "Sergey dot Belyashov at gmail dot com" 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-02/txt/msg01728.txt.bz2 I create this simple program: #include #include #include #include using namespace std; int main() { locale loc("ru_RU.UTF-8"); cout.imbue(loc); cout << 1234.56 << std::endl; setlocale(LC_NUMERIC, "ru_RU.UTF-8"); printf("%'.2f\n", 1234.56); return 0; } Result is: 1?234,56: (in hex): \x31\xC2\x32\x33\x34\x2C\x35\x36 1 234,56: (in hex): \x31\x20\x32\x33\x34\x2C\x35\x36 Here '?' is invalid symbol \xC2 then I try (code in C): #include #include int main() { setlocale(LC_ALL, "ru_RU.UTF-8"); printf("\"%s\"\n", localeconv()->thousands_sep); printf("%f\n", 1234.56); return 0; } Output is: " " (one space in double quotes) -- Summary: Invalid thousands separator in russian locale Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Sergey dot Belyashov at gmail dot com GCC build triplet: i486-linux-gnu GCC host triplet: i486-linux-gnu GCC target triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39243