Skip to content

Set specific non-UTF8 encodings for 2 known files in .gitattributes #2496

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Mar 16, 2025

I added the entries to .gitattributes.
I opened com/TestSources/PyCOMTest/PyCOMTest.idl as ISO-8859-1, fixed the "unknown characters", then saved under than encoding.
Finally I ran git add --renormalize for the changed files

@@ -26,7 +28,7 @@ typedef enum // Missing EnumTestAttributes2
uuid(6bcdcb60-5605-11d0-ae5f-cadd4c000000),
version(1.1),
// an extended character in the help string should stress things...
helpstring("Python COM Test Harness 1.0 Type Library, pywin32 contributors")
helpstring("Python COM Test Harness 1.0 Type Library, © pywin32 contributors")
Copy link
Collaborator Author

@Avasam Avasam Mar 16, 2025

Choose a reason for hiding this comment

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

This is one of only 2 places where this symbol is used. The other being

Copyright © 2003-2012.

Everywhere else is either (c) (136 times) or (C) (17 times)

It could just be changed to (c)

@mhammond
Copy link
Owner

In general we're not testing a specific encoding, just trying to avoid mojibake etc - I'd be fine with making everyting utf-8 except there the encoding really does specifically matter.

@Avasam
Copy link
Collaborator Author

Avasam commented Mar 17, 2025

com/TestSources/PyCOMTest/PyCOMTest.idl

For com/TestSources/PyCOMTest/PyCOMTest.idl, see this comment for details: #2493 (comment)

It'd be nice if it worked as UTF-8 as well. But I'm not certain of the proper change to make here.

For Pythonwin/pywin/test/_dbgscript.py iirc it's non-utf8 on purpose to test handling of reading non-utf8 files

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