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: github-redirect.dependabot.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:f22f3c84-b06a-4a59-3038-29238555e26c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C178:10E844:97E5B1:C8A705:696B557D |
| html-safe-nonce | e2e8d791a5e79820c6e205c8ac21148b2965b3a441abef0ad1f98ef25d6842ea |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTc4OjEwRTg0NDo5N0U1QjE6QzhBNzA1OjY5NkI1NTdEIiwidmlzaXRvcl9pZCI6Ijk3MzQwODg1OTk5ODM0NDU3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | df451802859aa90c27fa740ecd857b34af4f210f598305e1d4b53a8fabb97675 |
| 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 | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width