microsoft / microsoft/vcpkg

[boost-system] Need to define BOOST_SYSTEM_USE_UTF8

Open
#15,545 0 comments 1 reaction 2 assignees View on GitHub

@LilyWangLL is already working on this.

Since Jun 10, 2022.

category:port-feature
Dominant language
CMake
Stars
27.5k
Forks
7.7k
Avg merge
2d 19h
Merged PRs (30d)
321

Description


Is your feature request related to a problem? Please describe.
On Windows Boost.System error messages are scrambled on non latin 128 bit Windows systems. On a german system an invalid handle value error message without defining BOOST_SYSTEM_USE_UTF8 looks like this "Das angegebene Dateihandle ist ung³ltig" while it should look like this "Das angegebene Dateihandle ist ungültig". This is because BoostSystem error messages will be encoded with codepage CP_ACP if BOOST_SYSTEM_USE_UTF8 is not set and like this only ANSI characters are working correctly. The right way is to use CP_UTF8 and for displaying the text on Windows converting it to UTF-16. This can only be done if Boost.System is built with BOOST_SYSTEM_USE_UTF8 defined.

Proposed solution
#define BOOST_SYSTEM_USE_UTF8 when building Boost.System. See here:
https://www.boost.org/doc/libs/1_75_0/libs/system/doc/html/system.html

Describe alternatives you've considered
The only way I see currently is to patch the boost-system portfile and CMakeLists.txt.

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.