diff --git a/src/nanodbc.cpp b/src/nanodbc.cpp index 8e02d4a..2e42b91 100644 --- a/src/nanodbc.cpp +++ b/src/nanodbc.cpp @@ -209,10 +209,11 @@ namespace out = utf_to_utf(in.c_str(), in.c_str() + in.size()); #else #if defined(_MSC_VER) && (_MSC_VER == 1900) - // Workaround for confirmed bug in VS2015. - // See: https://social.msdn.microsoft.com/Forums/en-US/8f40dcd8-c67f-4eba-9134-a19b9178e481/vs-2015-rc-linker-stdcodecvt-error - auto p = reinterpret_cast(in.data()); - out = std::wstring_convert, wide_char_t>().to_bytes(p, p + in.size()); + // Workaround for confirmed bug in VS2015. See: + // https://connect.microsoft.com/VisualStudio/Feedback/Details/1403302 + // https://social.msdn.microsoft.com/Forums/en-US/8f40dcd8-c67f-4eba-9134-a19b9178e481/vs-2015-rc-linker-stdcodecvt-error + auto p = reinterpret_cast(in.data()); + out = std::wstring_convert, unsigned short>().to_bytes(p, p + in.size()); #else out = std::wstring_convert, wide_char_t>().to_bytes(in); #endif @@ -226,9 +227,10 @@ namespace using boost::locale::conv::utf_to_utf; out = utf_to_utf(in.c_str(), in.c_str() + in.size()); #elif defined(_MSC_VER) && (_MSC_VER == 1900) - // Workaround for confirmed bug in VS2015. - // See: https://social.msdn.microsoft.com/Forums/en-US/8f40dcd8-c67f-4eba-9134-a19b9178e481/vs-2015-rc-linker-stdcodecvt-error - auto s = std::wstring_convert, wide_char_t>().from_bytes(in); + // Workaround for confirmed bug in VS2015. See: + // https://connect.microsoft.com/VisualStudio/Feedback/Details/1403302 + // https://social.msdn.microsoft.com/Forums/en-US/8f40dcd8-c67f-4eba-9134-a19b9178e481/vs-2015-rc-linker-stdcodecvt-error + auto s = std::wstring_convert, unsigned short>().from_bytes(in); auto p = reinterpret_cast(s.data()); out.assign(p, p + s.size()); #else