C++ Logo


Advanced search

Re: [SG16-Unicode] [isocpp-lib] New issue: Are std::format field widths code units, code points, or something else?

From: Lyberta <lyberta_at_[hidden]>
Date: Wed, 11 Sep 2019 22:58:00 +0000
Thiago Macieira:
> True, but you can make sufficiently educated guesses. Aside from obscure EGCs,
> recently-standardised codepoints, unassigned codepoints and broken fonts, the
> renderer and the producer should be able to agree on what the width should be.
> Let's standardise on that.

So let's find only unambiguous cases. I think we can allow padding of
numbers with, say, zeroes because I'm unaware of number system using
complex EGCs in their numbers. Stuff like that. Also, can you pad text
with emojis? That's the case that's gonna hurt. So, we should be able to
come up with something very explicit such as not allowing scalar values
that combine into EGCs so that we have 1:1 mapping between scalar values
and EGCs.

I'm sorry, I haven't looked at the current spec of std::format and
haven't used fmt before so I can't provide any specifics at this time.

Received on 2019-09-12 00:58:53