Closed
Description
When using macro "CPPREST_STDLIB_UNICODE_CONVERSIONS" there is an issue while converting from the defined parameter "const std::string &s" to utf16 format.
Could you please change the name from "src" to "s" in line 287?
Current implementation:
`
utf16string __cdecl conversions::utf8_to_utf16(const std::string &s)
{
if defined(CPPREST_STDLIB_UNICODE_CONVERSIONS)
std::wstring_convert<std::codecvt_utf8_utf16<utf16char>, utf16char> conversion;
return conversion.from_bytes(src);
else
...
**Solution:**
utf16string __cdecl conversions::utf8_to_utf16(const std::string &s)
{
if defined(CPPREST_STDLIB_UNICODE_CONVERSIONS)
std::wstring_convert<std::codecvt_utf8_utf16<utf16char>, utf16char> conversion;
return conversion.from_bytes(s);
else
...
`
Metadata
Metadata
Assignees
Labels
No labels