diff --git a/googletest/src/gtest-printers.cc b/googletest/src/gtest-printers.cc
index ce1b2afca72ab55130c9bdc9b145414f2177b441..20ce1b8692fe45c716dbc4bd88b1d6728ced263c 100644
--- a/googletest/src/gtest-printers.cc
+++ b/googletest/src/gtest-printers.cc
@@ -44,6 +44,7 @@
 #include "gtest/gtest-printers.h"
 #include <stdio.h>
 #include <cctype>
+#include <cstdint>
 #include <cwchar>
 #include <ostream>  // NOLINT
 #include <string>
@@ -253,7 +254,7 @@ void PrintTo(wchar_t wc, ostream* os) {
 
 void PrintTo(char32_t c, ::std::ostream* os) {
   *os << std::hex << "U+" << std::uppercase << std::setfill('0') << std::setw(4)
-      << c;
+      << static_cast<uint32_t>(c);
 }
 
 // Prints the given array of characters to the ostream.  CharType must be either