Date: Sun, 30 Mar 2025 13:57:50 +0200
On 2025-03-30 at 13:27, Tiago Freire via Std-Proposals wrote:
> It’s a good question. But let me make another one.
>
> Why utf-8?
>
> That typically assumes that utf8 is some how a default, or that a system
> would be able to understand it, it doesn’t.
>
> cout has no encoding “other than 0 is a special character”, the console
> application is what gives meaning to it, it expects a certain encoding
> and it is not always utf8 (utf8 consoles are relatively new in this
> regard, in the sense it wasn’t a thing that was available when I started).
>
> And to be able to convert to a target encoding (utf8) you need to know
> what is the source encoding, what is the source encoding of “wchar_t”?
>
> It’s a large mountain to climb.
>
> Why not just abandon “wchar_t” and use “char16_t” instead? I know what
> that is… it’s utf-16.
>
It is Windows again, of course.
They once did the right thing, and implemented wchar_t as Unicode 1.0.
The final standard to solve all encoding problems by including
everything. This will work forever, promise!
> It’s a good question. But let me make another one.
>
> Why utf-8?
>
> That typically assumes that utf8 is some how a default, or that a system
> would be able to understand it, it doesn’t.
>
> cout has no encoding “other than 0 is a special character”, the console
> application is what gives meaning to it, it expects a certain encoding
> and it is not always utf8 (utf8 consoles are relatively new in this
> regard, in the sense it wasn’t a thing that was available when I started).
>
> And to be able to convert to a target encoding (utf8) you need to know
> what is the source encoding, what is the source encoding of “wchar_t”?
>
> It’s a large mountain to climb.
>
> Why not just abandon “wchar_t” and use “char16_t” instead? I know what
> that is… it’s utf-16.
>
It is Windows again, of course.
They once did the right thing, and implemented wchar_t as Unicode 1.0.
The final standard to solve all encoding problems by including
everything. This will work forever, promise!
Received on 2025-03-30 11:57:54