This only applies to legacy Windows APIs.

On Thu, Jul 2, 2026 at 8:48 PM Thiago Macieira via SG16 <sg16@lists.isocpp.org> wrote:
On Thursday, 2 July 2026 20:01:55 Pacific Daylight Time Victor Zverovich via
SG16 wrote:
> Moreover, ACP is mostly irrelevant in modern code and it's sufficient to
> compile with /utf-8 on MSVC (and on most other systems UTF-8 is the default
> for char).

That's not correct. That causes the compiler to interpret the source input as
UTF-8 and emit narrow character literals as UTF-8. It does not change how the
narrow character APIs behave at runtime.

To do that, you need to set the manifest flag that Tony mentioned. And only the
application (a.k.a. the owner of main()) can do that. Library code cannot and
must therefore cope with being run with another ACP. It could declare other
ACPs are not supported, but that would limit the audience of the library, as
most applications do not set the flag for some reason or another, including but
not limited to simply not knowing about it.

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Data Center - Platform & Sys. Eng.
--
SG16 mailing list
SG16@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/sg16
Link to this post: http://lists.isocpp.org/sg16/2026/07/4780.php