public inbox for libc-locales@sourceware.org
 help / color / mirror / Atom feed
From: "maiku.fabian at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: libc-locales@sourceware.org
Subject: [Bug localedata/23792] fr_FR.UTF8 thousands separator is not C++ conforming
Date: Wed, 03 Jan 2024 16:31:43 +0000	[thread overview]
Message-ID: <bug-23792-716-9VDWoUJzGD@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-23792-716@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=23792

Mike FABIAN <maiku.fabian at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maiku.fabian at gmail dot com

--- Comment #6 from Mike FABIAN <maiku.fabian at gmail dot com> ---
I cannot reproduce a problem here:

mfabian@hathi:/local/mfabian/src/glibc/localedata/locales (master $%)
$ cat test.cpp 
#include <iostream>
#include <locale>

using namespace std;

int
main()
{
  locale::global(locale(""));
  cout.imbue(locale());
  cout << 1000 << endl;
}
mfabian@hathi:/local/mfabian/src/glibc/localedata/locales (master $%)
$ g++ test.cpp 
mfabian@hathi:/local/mfabian/src/glibc/localedata/locales (master $%)
$ LC_ALL=de_DE.UTF-8 ./a.out
1.000
mfabian@hathi:/local/mfabian/src/glibc/localedata/locales (master $%)
$ LC_ALL=fr_FR.UTF-8 ./a.out
1 000
mfabian@hathi:/local/mfabian/src/glibc/localedata/locales (master $%)
$ LC_ALL=fr_FR.UTF-8 ./a.out | od -t x1
0000000 31 20 30 30 30 0a
0000006
mfabian@hathi:/local/mfabian/src/glibc/localedata/locales (master $%)
$

Surprisingly this prints a regular space in the French locale. Even
though the French locale uses U+202F NARROW NO-BREAK SPACE for

thousands_sep             " "

/usr/bin/printf prints U+202F NARROW NO-BREAK SPACE as the thousands
separator in French locale though:

mfabian@hathi:/local/mfabian/src/glibc/localedata/locales (master $%)
$ LC_ALL=de_DE.UTF-8 /usr/bin/printf "%'d\n" 1000
1.000
mfabian@hathi:/local/mfabian/src/glibc/localedata/locales (master $%)
$ LC_ALL=fr_FR.UTF-8 /usr/bin/printf "%'d\n" 1000
1 000
mfabian@hathi:/local/mfabian/src/glibc/localedata/locales (master $%)
$

So I don’t think there is a bug in glibc here.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2024-01-03 16:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 12:54 [Bug localedata/23792] New: " rguenth at gcc dot gnu.org
2018-10-18 12:54 ` [Bug localedata/23792] " rguenth at gcc dot gnu.org
2018-10-18 12:55 ` rguenth at gcc dot gnu.org
2018-10-18 20:01 ` jwakely.gcc at gmail dot com
2018-10-18 20:31 ` fweimer at redhat dot com
2018-10-19 11:52 ` jwakely.gcc at gmail dot com
2018-10-19 18:46 ` carlos at redhat dot com
2024-01-03 16:31 ` maiku.fabian at gmail dot com [this message]
2024-01-03 17:18 ` maiku.fabian at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-23792-716-9VDWoUJzGD@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=libc-locales@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).