GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Encoding issue with GitPython and Aider Usage · Issue #2030 · gitpython-developers/GitPython

Encoding issue with GitPython and Aider Usage #2030

New issue
Copy link
New issue
Copy link
Closed
Bug
#2308
Closed
Encoding issue with GitPython and Aider Usage#2030
Bug
#2308
Copy link

Description

@cvjxendra
cvjxendra
opened on May 28, 2025
Issue body actions

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.

Activity

  1. Byron commented on May 28, 2025

    @Byron
    Byron
    on May 28, 2025
    Member
    More actions

    One would have to find out where the decoding happens, and try to fix it.

    These UTF-8 issues usually occur with filenames, but not with content of files. Maybe the conversion happens on Aider's side?

    In any case, without a stack-trace, I don't think this issue is actionable, maybe to allow a surgical fix.

  2. cvjxendra commented on May 28, 2025

    @cvjxendra
    cvjxendra
    on May 28, 2025
    Author
    More actions

    Yes, I have filenames that use accented characteres. Will try to produce a stack trace.

    Reacted by Sebastian Thiel
  3. Byron
    added the
    Bug
    issue type on Jul 20, 2026
  4. Byron
    added a commit that references this issue on Oct 25, 2026

    fix(diff): preserve legacy filename bytes in staged diffs (#2030)

    a28ad51
  5. Byron
    closed this as completedin #2308on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.