Skip to content

UTF-8 encoding issues when handling filenames with accents on Git for Windows #6005

@Kaua-Nogueira

Description

@Kaua-Nogueira

Existing issues matching what you're seeing

  • I was not able to find an open or closed issue matching what I'm seeing

Git for Windows version

What happened?

When working on Git for Windows using Git Bash, files that contain accented characters in their names (such as ç, ã, é, í, ó) are not displayed correctly in the terminal output. The filenames appear corrupted due to an encoding/locale mismatch.

This issue affects commands like:

git status

git diff

git add

git log

Environment

OS: Windows 10/11

Shell: Git Bash (Git for Windows)

Encoding: UTF-8

Git version: (replace here after running git --version)

Steps to Reproduce

Create a repository on Git for Windows.

Create a file with accented characters in the name, for example:

touch documentação.txt


Run:

git status


Observe the filename printed with corrupted characters (mojibake).

Expected Behavior

File names containing UTF-8 accented characters should be displayed correctly in Git Bash when using Git for Windows.

Actual Behavior

The filename is displayed with broken encoding characters, for example:
documentação.txt

Impact

Makes filenames difficult to identify

Affects developers who work in Portuguese, Spanish, French, etc.

Reduces usability and clarity when reviewing changes

Additional Information

This issue has existed for a long time in Git for Windows due to encoding inconsistencies between terminal locale and Git output. It does not occur on Linux or macOS under the same steps.

Windows version

Windows 11

Windows CPU architecture

x86_64 (64-bit)

Additional Windows version information

Options set during installation

default

Other interesting things

No response

Terminal/shell

cmd

Commands that trigger the issue

git status

Expected behaviour

I expected Git for Windows to correctly display UTF-8 accented filenames in the Git Bash console without encoding corruption.

Actual behaviour

The output shows corrupted filename characters, such as:

documentação.txt

Repository

No response

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