This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Locales: Use CLDR matching thousands separator
- From: Rafal Luzynski <digitalfreak at lingonborough dot com>
- To: Marko Myllynen <myllynen at redhat dot com>, Carlos O'Donell <carlos at redhat dot com>, Florian Weimer <fw at deneb dot enyo dot de>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 9 Oct 2018 22:59:41 +0200 (CEST)
- Subject: Re: [PATCH] Locales: Use CLDR matching thousands separator
- References: <eb1814b5-cae3-8472-ece6-44bec12d570b@redhat.com> <a2a29fbe-6872-c123-d4d0-2b8664825e72@redhat.com> <1786676151.161483.1534532463077@poczta.nazwa.pl> <9848a4de-2b6e-895b-d601-1358b79ef9f9@redhat.com> <414408229.228264.1534887501434@poczta.nazwa.pl> <349a70bd-92ba-e32f-e396-e4e595994029@redhat.com> <8736tgz2yb.fsf@mid.deneb.enyo.de> <1b30c4b8-6abe-df7c-07eb-2493e6759376@redhat.com> <0c0a1e5e-dab0-7047-d251-871813bd957d@redhat.com>
- Reply-to: Rafal Luzynski <digitalfreak at lingonborough dot com>
9.10.2018 10:38 Marko Myllynen <myllynen@redhat.com> wrote:
> [...]
> I wonder would it make sense to consider an addition to provide a
> function that would recognize non-breaking spaces, to allow applications
> to detect something like "123 456" as a single number, regardless of the
> exact variant of no-break space used in between.
I think that what we need is to split the "space" class into the
subclasses: "breaking space" and "non-breaking space", or maybe rather
define just "breaking space" and "non-breaking space":
def is_breaking_space(conde_point):
'''
def is_non_breaking_space(code_point):
'''
def is_space(code_point):
return is_breaking_space(code_point) ||
is_non_breaking_space(code_point)
so that application would be able to distinguish whether a space
is breaking or non-breaking or whether it is a space in general.
> I'm not sure on what level such an addition should ideally be done
> (standards, GNU/glibc, a higher-level library, perhaps something else),
> so I won't start championing such a change further.
Same here.
Regards,
Rafal