C++ Logo

sg16

Advanced search

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

From: Steve Downey <sdowney_at_[hidden]>
Date: Tue, 2 Mar 2021 17:48:28 -0500
On Tue, Mar 2, 2021 at 3:46 PM Peter Brett via SG16 <sg16_at_[hidden]>
wrote:

> I would like to know if there is consensus that producing mojibake is
> always a bug.
>
> Peter
>
>
> Given the untyped APIs we are talking about, I'd say that mojibake is a
bug due to unenforceable preconditions.
If someone actually desires mojibake, for whatever reason, it's not a bug
that the byte oriented string functions allow broken multibyte characters
to be created.

If we were discussing a std::text_view proposal, I might have different
positions. But NTBSs and NTMBSs are inherently mojibake enabled, especially
since they have the same type.

Received on 2021-03-02 16:48:38