Skip to content

Change mbcs encoding to utf-8 in com/win32com/client#2097

Merged
mhammond merged 4 commits intomhammond:mainfrom
Avasam:mbcs-encoding-to-utf8
Nov 1, 2023
Merged

Change mbcs encoding to utf-8 in com/win32com/client#2097
mhammond merged 4 commits intomhammond:mainfrom
Avasam:mbcs-encoding-to-utf8

Conversation

@Avasam
Copy link
Copy Markdown
Collaborator

@Avasam Avasam commented Aug 9, 2023

#1990 (comment)

[...] I suspect this is wrong now - when this file is being read I believe it will be assumed utf-8. Ditto the mbcs reference in build.py

- @mhammond

This changes more than what the initial comment mentioned, but I figured may as well review all usages of it. Even if we end up reverting because the needed changes would be too big or wrong.

  • Changed mbcs to utf-8 in com/win32com/client
  • Removed unused mbcs encoding code in Pythonwin/pywin/

Comment thread win32/Demos/win32gui_dialog.py
Copy link
Copy Markdown
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for now we should only change the COM functions - where we generate a .py file. Most of the other places changed are quite possibly wrong as it's not Python file IO consuming the bytes.

Comment thread win32/Demos/win32gui_dialog.py
Comment thread Pythonwin/pywin/__init__.py Outdated
Comment thread Pythonwin/pywin/tools/hierlist.py Outdated
Comment thread isapi/install.py Outdated
@Avasam Avasam changed the title Change mbcs encoding to utf-8 Change mbcs encoding to utf-8 in com/win32com/client Aug 10, 2023
@Avasam Avasam requested a review from mhammond August 10, 2023 17:14
Copy link
Copy Markdown
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@Avasam
Copy link
Copy Markdown
Collaborator Author

Avasam commented Nov 1, 2023

Thanks

Bumping this PR. This has been approved but not merged @mhammond

@mhammond mhammond merged commit 309a8b0 into mhammond:main Nov 1, 2023
@Avasam Avasam deleted the mbcs-encoding-to-utf8 branch November 1, 2023 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants