[Bug libstdc++/29379] bad thousand separator with UTF-8 locales

2006-10-07 Thread pcarlini at suse dot de


--- Comment #1 from pcarlini at suse dot de  2006-10-07 17:03 ---
This a well known not a bug (I'm sure similar issues are discussed in the
mailing list, also user code implementing char - char conversions via iconv):
output to UTF-8 is done by wchar_t streams (thus, for example, wcout not cout),
which use a std::codecvtwchar_t, char, mbstate_t to convert from the internal
wchar_t representation to an external sequence of UTF-8 chars: note that
nothing in the standard mandates the availability in the library of non-trivial
conversions char - char. Many examples of proper UTF-8 output in the
testsuite.


-- 

pcarlini at suse dot de changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug libstdc++/29379] bad thousand separator with UTF-8 locales

2006-10-07 Thread pcarlini at suse dot de


--- Comment #2 from pcarlini at suse dot de  2006-10-07 17:28 ---
Forgot to add: after having properly switched to a wchar_t stream, we must make
sure that it actually does the conversion: the clean solution via std::codecvt
is used by default only in converting streams (file streams), whereas calling
at the outset std::ios::sync_with_stdio(false) is needed for wcout.
Alternately, C-style, one can change the global locale and exploit the
conversion behind the scenes carried out by the individual underlying putwc.


-- 


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



[Bug libstdc++/29379] bad thousand separator with UTF-8 locales

2006-10-07 Thread pcarlini at suse dot de


--- Comment #3 from pcarlini at suse dot de  2006-10-07 19:47 ---
Reopen...


-- 

pcarlini at suse dot de changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |


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



[Bug libstdc++/29379] bad thousand separator with UTF-8 locales

2006-10-07 Thread pcarlini at suse dot de


--- Comment #4 from pcarlini at suse dot de  2006-10-07 19:48 ---
... to mark it as duplicate.

*** This bug has been marked as a duplicate of 16006 ***


-- 

pcarlini at suse dot de changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


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