On Windows string_t is a 2 byte character, assumed UTF-16 string in the C++ Rest SDK. For some data critical areas we could make API overloads that work with std::string or return std::string.
This has come up numerous times from customers, internal and external.
Steve
Comments: It would be awesome to give a choice between UTF8 and UTF16. My team wants to keep all our data in UTF8 and we would like to use the JSON parsing component of the C++ Rest SDK. We saw in the source code that there is an #ifdef _WIN32 that makes all strings wstrings. That forces us to convert from UTF-16 to UTF8, then parse the JSON, then extract some string data from JSON, then convert that back to UTF-8. We would love to avoid all that needless conversion (the files are UTF-8 on disk)
This has come up numerous times from customers, internal and external.
Steve
Comments: It would be awesome to give a choice between UTF8 and UTF16. My team wants to keep all our data in UTF8 and we would like to use the JSON parsing component of the C++ Rest SDK. We saw in the source code that there is an #ifdef _WIN32 that makes all strings wstrings. That forces us to convert from UTF-16 to UTF8, then parse the JSON, then extract some string data from JSON, then convert that back to UTF-8. We would love to avoid all that needless conversion (the files are UTF-8 on disk)