Skip to content

Commit

Permalink
Fix Windows build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ObsidianMinor committed May 18, 2018
1 parent 1b1460d commit 4adf0a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/google/protobuf/compiler/csharp/csharp_helpers.cc
Expand Up @@ -449,9 +449,9 @@ std::string StringToBase64(const std::string& input) {
static const char hex_chars[] = "0123456789abcdef";

std::string StringToEscapedCSharpString(const std::string& input) {
// convert string to UTF16 to make unicode literals
std::wstring_convert<std::codecvt_utf8<char16_t>,char16_t> converter;
std::u16string converted = converter.from_bytes(input);
// convert UTF8 string to UTF16 to make unicode literals
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>,wchar_t> converter;
std::wstring converted = converter.from_bytes(input);
std::string result;
for (int i = 0; i < converted.size(); i++) {
result += "\\u";
Expand Down

0 comments on commit 4adf0a9

Please sign in to comment.