r/cpp • u/alberto-m-dev • Jun 26 '26
Improvements to std::format in C++26
https://mariusbancila.ro/blog/2026/06/19/improvements-to-stdformat-in-c26/
91
Upvotes
r/cpp • u/alberto-m-dev • Jun 26 '26
View all comments
Show parent comment
1
u/rdtsc Jun 27 '26
Sure it might be legacy, doesn't change the fact that it is used for all double-quoted strings on Windows. If you want UTF-8 use u8"" and char8_t. Converting
L"ä"I get"\xE4". Formattingpath(L"ä")to"\xC3\xA4"would be unexpected/surprising, incompatible with other strings, and result in garbled text when the string is then displayed.