Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale #85210

Closed
nnemkin mannequin opened this issue Jun 19, 2020 · 4 comments
Closed

VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale #85210

nnemkin mannequin opened this issue Jun 19, 2020 · 4 comments
Assignees
Labels
3.8 only security fixes 3.9 only security fixes 3.10 only security fixes OS-windows type-bug An unexpected behavior, bug, or error

Comments

@nnemkin
Copy link
Mannequin

nnemkin mannequin commented Jun 19, 2020

BPO 41038
Nosy @pfmoore, @tjguk, @zware, @zooba, @nnemkin, @miss-islington
PRs
  • bpo-41038: Fix non-ASCII string corruption in Win32 resource files #20985
  • [3.9] bpo-41038: Fix non-ASCII string corruption in Win32 resource files (GH-20985) #21122
  • [3.8] bpo-41038: Fix non-ASCII string corruption in Win32 resource files (GH-20985) #21123
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/zooba'
    closed_at = <Date 2020-06-24.16:29:08.535>
    created_at = <Date 2020-06-19.15:18:28.354>
    labels = ['3.10', 'type-bug', '3.8', '3.9', 'OS-windows']
    title = 'VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale'
    updated_at = <Date 2020-06-24.16:47:48.443>
    user = 'https://github.com/nnemkin'

    bugs.python.org fields:

    activity = <Date 2020-06-24.16:47:48.443>
    actor = 'miss-islington'
    assignee = 'steve.dower'
    closed = True
    closed_date = <Date 2020-06-24.16:29:08.535>
    closer = 'steve.dower'
    components = ['Windows']
    creation = <Date 2020-06-19.15:18:28.354>
    creator = 'nnemkin'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 41038
    keywords = ['patch']
    message_count = 4.0
    messages = ['371888', '372257', '372258', '372263']
    nosy_count = 6.0
    nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'steve.dower', 'nnemkin', 'miss-islington']
    pr_nums = ['20985', '21122', '21123']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue41038'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    @nnemkin
    Copy link
    Mannequin Author

    nnemkin mannequin commented Jun 19, 2020

    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.

    Another possible fix is to use codepage 65001, but that will require replacing \xA9 with an actual ©, because it seems impossible to escape unicode characters in VersionInfo strings.

    @nnemkin nnemkin mannequin added 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes OS-windows type-bug An unexpected behavior, bug, or error labels Jun 19, 2020
    @zooba
    Copy link
    Member

    zooba commented Jun 24, 2020

    New changeset 33b79b1 by Nikita Nemkin in branch 'master':
    bpo-41038: Fix non-ASCII string corruption in Win32 resource files (GH-20985)
    33b79b1

    @zooba zooba closed this as completed Jun 24, 2020
    @zooba zooba self-assigned this Jun 24, 2020
    @zooba zooba closed this as completed Jun 24, 2020
    @zooba zooba self-assigned this Jun 24, 2020
    @miss-islington
    Copy link
    Contributor

    New changeset fb4a624 by Miss Islington (bot) in branch '3.8':
    bpo-41038: Fix non-ASCII string corruption in Win32 resource files (GH-20985)
    fb4a624

    @miss-islington
    Copy link
    Contributor

    New changeset 153e20e by Miss Islington (bot) in branch '3.9':
    bpo-41038: Fix non-ASCII string corruption in Win32 resource files (GH-20985)
    153e20e

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes 3.9 only security fixes 3.10 only security fixes OS-windows type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants