]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41038: Fix non-ASCII string corruption in Win32 resource files (GH-20985)
authorNikita Nemkin <nikita@nemkin.ru>
Wed, 24 Jun 2020 16:27:42 +0000 (21:27 +0500)
committerGitHub <noreply@github.com>
Wed, 24 Jun 2020 16:27:42 +0000 (17:27 +0100)
In absence of explicit declaration, resource compiler uses system
codepage. When this codepage is DBCS or UTF-8, Python's copyright
string is corrupted, because it contains copyright sign encoded
as \xA9.

The fix is to explicitly declare codepage 1252.

PC/python_ver_rc.h

index c318d4487ea1b858bbf757970146b25b44baaba2..060aecdc675cb9a83b59e641119b9b1cb1f7ad81 100644 (file)
@@ -1,6 +1,7 @@
 // Resource script for Python core DLL.
 // Currently only holds version information.
 //
+#pragma code_page(1252)
 #include "winver.h"
 
 #define PYTHON_COMPANY   "Python Software Foundation"