C++ Logo


Advanced search

Portable unicode string and missing snwprintf function

From: Nicolas M <kiruahxh_at_[hidden]>
Date: Thu, 17 Nov 2022 14:39:23 +0100

While porting some Microsoft C++ code to the Linux platform, I have
realized that while there is snprintf() function for std::string, there is
no direct equivalent for std::wstring.

Do you think such a function could be added to the standard? It would make
std::wstring a more viable alternative to std::string.

On the other hand, with Windows starting to support UTF-8 programs as of
2019 (and UTF-8 std::string), std::string might become a simple way to
store unicode text in cross-platform programs.

Best Regards

Received on 2022-11-17 13:39:36