Title: Encoding issue with GitPython and Aider Usage · Issue #2030 · gitpython-developers/GitPython · GitHub
Open Graph Title: Encoding issue with GitPython and Aider Usage · Issue #2030 · gitpython-developers/GitPython
X Title: Encoding issue with GitPython and Aider Usage · Issue #2030 · gitpython-developers/GitPython
Description: Environment: OS: Windows 10. Python: 3.11.9 Git: 2.46.1.windows.1 Aider v0.83.2 (this is the current version) Git repository index version: 2 (verified with git update-index --show-index-version) I’m encountering an issue when using Aide...
Open Graph Description: Environment: OS: Windows 10. Python: 3.11.9 Git: 2.46.1.windows.1 Aider v0.83.2 (this is the current version) Git repository index version: 2 (verified with git update-index --show-index-version) I...
X Description: Environment: OS: Windows 10. Python: 3.11.9 Git: 2.46.1.windows.1 Aider v0.83.2 (this is the current version) Git repository index version: 2 (verified with git update-index --show-index-version) I...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/2030
X: @github
Domain: redirect.github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Encoding issue with GitPython and Aider Usage","articleBody":"Environment:\n- OS: Windows 10.\n- Python: 3.11.9 \n- Git: 2.46.1.windows.1\n- Aider v0.83.2 (this is the current version)\n- Git repository index version: 2 (verified with git update-index --show-index-version)\n\nI’m encountering an issue when using Aider, a programming tool that relies on GitPython to interact with my Git repository. When starting Aider, I get the following error:\n\"Unable to read staged files: 'utf-8' codec can't decode byte 0xf5 in position 18: invalid start byte\"\n\nBecause of this error, I’m forced to run Aider with the --no-git option to bypass Git integration. \n\nMy repository primarily contains legacy Delphi 7 code, with files encoded in Windows-1252.\n\nIf I understand correctly, GitPython assumes files are in UTF-8 by default, but this doesn’t match my files’ encoding. Given the legacy nature of the project and the large number of files, converting them all to UTF-8 is not a viable solution for me.\n\nThere are any solutions in this case? \n\nThank you.","author":{"url":"https://github.com/cvjxendra","@type":"Person","name":"cvjxendra"},"datePublished":"2025-05-28T12:42:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/2030/GitPython/issues/2030"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fc57be92-e1b4-3a90-06e4-dea7de92c7d8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 99F8:35B83:368DFF:48077C:69697C3B |
| html-safe-nonce | cfa99a15da62abce90924b34c3d28960f0981185f9b013d6d1870e80c17f3358 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OUY4OjM1QjgzOjM2OERGRjo0ODA3N0M6Njk2OTdDM0IiLCJ2aXNpdG9yX2lkIjoiNzgyNzIzNzY5NDM2OTAwNDYwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fb8717c7f073d3df3d9a7aa91765df54451b2b2450a75e280d37f19abc8fd079 |
| hovercard-subject-tag | issue:3097233765 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gitpython-developers/GitPython/2030/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c1996de5b694e8e44eb25e65fe7545a7842274e7e91149f1d0165600ba79ee84/gitpython-developers/GitPython/issues/2030 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c1996de5b694e8e44eb25e65fe7545a7842274e7e91149f1d0165600ba79ee84/gitpython-developers/GitPython/issues/2030 |
| og:image:alt | Environment: OS: Windows 10. Python: 3.11.9 Git: 2.46.1.windows.1 Aider v0.83.2 (this is the current version) Git repository index version: 2 (verified with git update-index --show-index-version) I... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cvjxendra |
| hostname | github.com |
| expected-hostname | github.com |
| None | f33e4b94c8824ab2b434d82a94139432fb5ebee9df4b75304140ad22508c4a77 |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 48f380098b30acbb700b04f1724481ca10d574fc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width