C++ Logo


Advanced search

Re: [SG16] Is the concept of basic execution character sets useful?

From: Jens Maurer <Jens.Maurer_at_[hidden]>
Date: Wed, 3 Feb 2021 22:03:21 +0100
On 03/02/2021 21.45, Corentin wrote:
> On Wed, Feb 3, 2021 at 9:22 PM Jens Maurer <Jens.Maurer_at_[hidden] <mailto:Jens.Maurer_at_[hidden]>> wrote:
> On 03/02/2021 19.22, Corentin wrote:
> > I thought we had discussed that the standard library has certain
> > facilities with locale-dependent character set.
> > I haven't found a mention of "execution character set" in the library
> > wording, so I'm interested in learning how these locale-dependent
> > character sets are described / referenced.
> >
> >
> > There is a whole new paragraph in the library introduction (page 10).
> That paragraph doesn't define the term "execution character set",
> for example.
> That paragraph is (supposed to be) the definition. these terms are not mentioned before and are introduced in this paragraph which (attempts to) describe them

That paragraph fails in doing that.

> And I have trouble parsing the sentences here. In particular, I
> don't understand to what
> "with the same value in the execution character set"
> refers to ("the same" relative to what?)
> Same code point value.
> Say your literal encoding is ASCII, the code point value for 'A' is 65, then the execution encoding is such that the code point value of A is also 65.

And that means std::isalpha, for example, will return true?
Are any other functions affected by that constraint?
Where did we have that constraint previously?
Where is the C++20 normative statement for the edited
footnote in [multibyte.string]?
And does that mean I can't compile a program with an EBCDIC
compiler (producing EBCDIC literal encoding) and then
running it in an ASCII environment? Or does that just
mean certain functions won't work on literals as
expected, e.g. std::isalpha('a') might not return true?

> I struggled a bit with the formulation.
> I'm trying to say that both the execution character set and encoding are ""super sets"" of the literal ones, but "super set" of encoding does not seem like a good formulation.

Where do we say that in the C++20 wording?


Received on 2021-02-03 15:03:33