Encoding issue with GitPython and Aider Usage · Issue #2030 · gitpython-developers/GitPython · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Encoding issue with GitPython and Aider Usage #2030

Open
@cvjxendra

Description

@cvjxendra

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 Aider, a programming tool that relies on GitPython to interact with my Git repository. When starting Aider, I get the following error:
"Unable to read staged files: 'utf-8' codec can't decode byte 0xf5 in position 18: invalid start byte"

Because of this error, I’m forced to run Aider with the --no-git option to bypass Git integration.

My repository primarily contains legacy Delphi 7 code, with files encoded in Windows-1252.

If 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.

There are any solutions in this case?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      TMZ Celebrity News – Breaking Stories, Videos & Gossip

      Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

      Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

      🎥 Watch TMZ Live

      TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.