79449469

Date: 2025-02-18 20:12:19
Score: 1.5
Natty:
Report link

The standard C library provides mbstowcs and wcstombs which probably do everything that is required except using std::string and std::wstring. A std::string to std::wstring function based on mbstowcs would almost certainly be a lot faster than using std::wstringbuffer.

This the wc* and mb* function are required in C11 so should be supported everywhere but don't have any access to MSVC++ to check. A lot of programs use UTF 8 to avoid all the issues around byte order, how many bits fit in a wide character (32 bits in glibc, 16 bits on windows), etc.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user29701189