Date: Sun, 30 Mar 2025 15:04:52 -0400
On Sunday, 30 March 2025 13:38:24 Eastern Daylight Time Jonathan Wakely via
Std-Proposals wrote:
> > It wouldn't harm anyone if it was in C++,
>
> Apart from the implementers who have to do it for you, and everybody who
> has to wait for other features to be implemented because that has to be
> done.
Does wprintf() even work "everywhere" reliably? It obviously works on Windows
and I'm confident glibc implements it (via automatic transcoding using iconv/
gconv), but everywhere? My experience with non-mainstream libcs and specialty
OSes is that they are very hit and miss... Even if the implementation is
there, there will be hidden tigers and crouching dragons ready to pounce.
There is little money for vendors to do anything but a token support, sufficient
to get a certification or the semblance of one.
The only reason for wprint to exist is WriteConsoleW on Windows and that's it.
I would only think of ever using wprint / wprintf because the encoding is
*unambiguous* for the Windows console, whereas for the 8-bit version, there
are three different possible encodings: UTF-8, the Windows ANSI codepage, and
the legacy DOS codepage.
Std-Proposals wrote:
> > It wouldn't harm anyone if it was in C++,
>
> Apart from the implementers who have to do it for you, and everybody who
> has to wait for other features to be implemented because that has to be
> done.
Does wprintf() even work "everywhere" reliably? It obviously works on Windows
and I'm confident glibc implements it (via automatic transcoding using iconv/
gconv), but everywhere? My experience with non-mainstream libcs and specialty
OSes is that they are very hit and miss... Even if the implementation is
there, there will be hidden tigers and crouching dragons ready to pounce.
There is little money for vendors to do anything but a token support, sufficient
to get a certification or the semblance of one.
The only reason for wprint to exist is WriteConsoleW on Windows and that's it.
I would only think of ever using wprint / wprintf because the encoding is
*unambiguous* for the Windows console, whereas for the 8-bit version, there
are three different possible encodings: UTF-8, the Windows ANSI codepage, and
the legacy DOS codepage.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel DCAI Platform & System Engineering
Received on 2025-03-30 19:04:57