소스 검색

Use LANG_ENGLISH in windows error messages

This change prevents us from generating corrupt messages when we
are confused about codepage settings, and makes Windows errors
consistent with the rest of our logs.

Fixes bug 22520; bugfix on 0.1.2.8-alpha.  Patch from "Vort".
Nick Mathewson 7 년 전
부모
커밋
63ceadb485
2개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 0
      changes/bug22520
  2. 1 1
      src/common/compat.c

+ 5 - 0
changes/bug22520

@@ -0,0 +1,5 @@
+  o Minor bugfixes (error reporting, windows):
+    - When formatting Windows error messages, use the English format
+      to avoid codepage issues. Fixes bug 22520; bugfix on
+      0.1.2.8-alpha. Patch from "Vort".
+

+ 1 - 1
src/common/compat.c

@@ -3261,7 +3261,7 @@ format_win32_error(DWORD err)
                  FORMAT_MESSAGE_FROM_SYSTEM |
                  FORMAT_MESSAGE_IGNORE_INSERTS,
                  NULL, err,
-                 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+                 MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT),
                  (LPVOID)&str,
                  0, NULL);