[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#351786: marked as done ([PR29379] bad thousand separator with UTF-8 locales)



Your message dated Sat, 7 Oct 2006 20:31:43 +0200
with message-id <17703.62095.452832.795939@gargle.gargle.HOWL>
and subject line [Bug libstdc++/29379] bad thousand separator with UTF-8 locales
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libstdc++6
Version: 4.0.2-7
Severity: normal
Tags: l10n

Summary : outputs weird caracters instead of proper thousand
separator.

Consider the attached simple program.  It ouputs a wrong thousand
separator using fr_FR.UTF-8 (i haven't tested other locales). (French
thousand separator should be '.' (dot)) Moreover, the current thousand
separator is weird : it outputs a '\xc2'. '\xc2' looks like the
beginning of a multibyte UTF-8 char.

I'm using belocs-locales.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-powerpc
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8)

Versions of packages libstdc++6 depends on:
ii  gcc-4.0-base                  4.0.2-7    The GNU Compiler Collection (base 
ii  libc6                         2.3.5-12.1 GNU C Library: Shared libraries an
ii  libgcc1                       1:4.0.2-7  GCC support library

libstdc++6 recommends no packages.

-- no debconf information
#include <iostream>
#include <locale>

int main()
{
	std::cout << "cout no locale : " << 1024 << '\n';
	std::cout.imbue(std::locale(""));
	std::cout << "cout with locale : " << 1024 << '\n';
}


--- End Message ---
--- Begin Message ---
pcarlini at suse dot de writes:
> 
> 
> ------- 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::codecvt<wchar_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

--- End Message ---

Reply to: