C++ Logo


Advanced search

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

From: Thiago Macieira <thiago_at_[hidden]>
Date: Wed, 11 Sep 2019 16:17:52 -0700
On Wednesday, 11 September 2019 13:06:39 PDT Tom Honermann wrote:
> > What can we say about the contents of "result1" and "result2"?
> > Are they the same? Does it matter what the contents of `s` is?
> Excellent questions.
> I really want them to be the same (at least by default, additional
> opt-in support for locale/encoding sensitive alignment strike me as
> potentially reasonable assuming identification of compelling use cases).
> I don't think the contents of `s` should matter (without additional opt-in).

On the other hand, this may be the perfect time to get rid of legacy mistakes.
Any moderately good reason for them to be different should be enough.

The big issue is understanding how many positions a string like "\xc3\xa9"
consumes. Is it really too much to ask that it be decoded according to the
locale-specified encoding?

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel System Software Products

Received on 2019-09-12 01:17:55