C++ Logo

sg16

Advanced search

Re: [SG16] Towards a better description of the execution encoding

From: Jens Maurer <Jens.Maurer_at_[hidden]>
Date: Tue, 2 Mar 2021 21:44:49 +0100
On 02/03/2021 10.35, Corentin via SG16 wrote:
> My intent is to say " The standard assumes that all strings are interpreted by local specific functions as being encoded by the execution encoding and if that's not the case, you will get mojibake or any other behavior that may be the result of your input not being interpreted correctly"

Why do we have to say anything here, beyond possibly clarifying the
locale-dependent functions such as isalpha that they're not talking
about a character set (or characters), but about an encoding of such?

The fact that we've divorced the literal encoding from the execution
encoding is exactly because they are entirely unrelated, as sad as
that may be. "Unrelated" means no constraints, and we don't need to
spend text in the standard (beyond a note or two) specifying the
absence of restrictions.

Any time the introduction of limited constraints was brought up here
in the past month, a real-world counterexample was quickly found,
where we'd shy away from making it non-conforming.

Jens

Received on 2021-03-02 14:44:54