Skip to content

Commit

Permalink
bpo-41038: Fix non-ASCII string corruption in Win32 resource files (G…
Browse files Browse the repository at this point in the history
…H-20985)

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.
(cherry picked from commit 33b79b1)

Co-authored-by: Nikita Nemkin <nikita@nemkin.ru>
  • Loading branch information
miss-islington and nnemkin committed Jun 24, 2020
1 parent adf8708 commit fb4a624
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions PC/python_ver_rc.h
@@ -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"
Expand Down

0 comments on commit fb4a624

Please sign in to comment.