Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

Commented Feature: Windows - support for utf-8, single byte strings [239]

$
0
0
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)

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>