This is the mail archive of the gcc-bugs@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]

[Bug libstdc++/39168] Incorrect interpretation of CHAR_MAX inside grouping string in monetary and numeric facets.



------- Comment #12 from tsyvarev at ispras dot ru  2009-02-13 15:04 -------
Let's consider the following situation (seems lifelike to me). Suppose one
needs a representation of numbers in which only the last 3 digits are separated
from all other digits (grouped), like "1234,567" or "1234567,890". Other
separators shouldn't appear.

Grouping string "\003" doesn't fit for this purpose as it separates all
3-digits groups: "1,234,567".
Before this PR, I thought that "\003\177" is sufficient for this purpose. But,
as I understand now, the representations like "12,34,567" are acceptable in
this case, which is not what I would like to have.

Could you suggest which grouping string should be used to do such number
representation? Or is this unachievable?

I investigated locale support in POSIX, such number representation is achieved
there with "\003\177". It seems strange for me that similar mechanism is not
work with C++ locales.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39168


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