浏览代码

Force to use U.S. English for Win32 error messages (#4317)

Charlie Jiang 5 年之前
父节点
当前提交
70fc0f0275
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/google/protobuf/compiler/subprocess.cc

+ 1 - 1
src/google/protobuf/compiler/subprocess.cc

@@ -274,7 +274,7 @@ std::string Subprocess::Win32ErrorMessage(DWORD error_code) {
   // WTF?
   FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
                      FORMAT_MESSAGE_IGNORE_INSERTS,
-                 NULL, error_code, 0,
+                 NULL, error_code, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
                  (LPSTR)&message,  // NOT A BUG!
                  0, NULL);