public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/39243] New: Invalid thousands separator in russian locale
@ 2009-02-19 15:20 Sergey dot Belyashov at gmail dot com
2010-01-08 18:48 ` [Bug libstdc++/39243] " paolo dot carlini at oracle dot com
0 siblings, 1 reply; 2+ messages in thread
From: Sergey dot Belyashov at gmail dot com @ 2009-02-19 15:20 UTC (permalink / raw)
To: gcc-bugs
I create this simple program:
#include <iostream>
#include <locale>
#include <clocale>
#include <cstdio>
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 <stdio.h>
#include <locale.h>
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libstdc++/39243] Invalid thousands separator in russian locale
2009-02-19 15:20 [Bug libstdc++/39243] New: Invalid thousands separator in russian locale Sergey dot Belyashov at gmail dot com
@ 2010-01-08 18:48 ` paolo dot carlini at oracle dot com
0 siblings, 0 replies; 2+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-08 18:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from paolo dot carlini at oracle dot com 2010-01-08 18:47 -------
*** This bug has been marked as a duplicate of 16006 ***
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39243
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-08 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-19 15:20 [Bug libstdc++/39243] New: Invalid thousands separator in russian locale Sergey dot Belyashov at gmail dot com
2010-01-08 18:48 ` [Bug libstdc++/39243] " paolo dot carlini at oracle dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).