C++ Logo

sg16

Advanced search

Re: [SG16-Unicode] [isocpp-lib] New issue: Are std::format field widths code units, code points, or something else?

From: Thiago Macieira <thiago_at_[hidden]>
Date: Tue, 10 Sep 2019 17:07:34 -0700
On Sunday, 8 September 2019 16:25:47 PDT Tom Honermann wrote:
> I think Microsoft will eventually provide (non-experimental) means to use
> UTF-8 with Win32 and that this will likely come in three forms:
>
> 1) support for UTF-8 as the system wide Active Code Page (ACP). This is
> already available as an experimental option.
>
> 2) support for executables to opt-in to a per-process override of the system
> wide ACP. In this mode, stdio would presumably traffic in the system wide
> ACP and require transcoding (I don’t think implicit transcoding is
> realistic). This is already available as an experimental option.

2b) support for the runtime to opt-in to a per-runtime override of the system-
wide ACP for the API it provides, but not the Win32 "A" API. That would
rehabilitate fopen() and all the C and C++ standard APIs, facilitating porting
from other OSes and enabling UTF-8 new code. Moreover, it need not be process-
wide: other runtime assemblies loaded in the same process can continue with
whatever they were coded to use.

Note that loading multiple runtimes in a process is a horrible idea, though
entirely possible. Source of many a bug report about crashing when freeing
memory.

>
> 3) support for a subset of Win32 interfaces that take char8_t. E.g., U8
> variants of some existing A/W interfaces.


-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel System Software Products

Received on 2019-09-11 02:07:36