Git displays filenames with special characters as octal escape sequences like \303\251 instead of proper Unicode. This occurs when core.quotepath is enabled (default behavior).
Git's core.quotepath configuration controls how filenames with non-ASCII characters are displayed in command outputs. When enabled (the default), Git "protects" your terminal by escaping characters with byte values greater than 0x80 using octal notation (e.g., \302\265 for micro symbol μ in UTF-8). While this prevents potential issues with older terminals, it makes filenames with accented characters, emoji, or non-Latin scripts nearly unreadable. This behavior is intentional and conservative—Git assumes your terminal might not handle Unicode properly. Commands like git status, git diff, and git ls-files will all show these escaped sequences instead of the actual characters. For example, a file named "café.txt" appears as "caf\303\251.txt". The core.quotepath setting dates back to when terminal Unicode support was inconsistent. Modern terminals almost universally support UTF-8, making this escaping unnecessary for most developers.
Check if quote path escaping is enabled:
If this returns "true" or nothing (true is the default), escaping is active.
Tell Git your terminal can handle UTF-8 characters directly:
This applies to all repositories for your user account.
If you only want this for the current repository:
(Omit the --global flag)
Disable escaping for just one command without changing config:
macOS HFS+ Unicode Decomposition: macOS's HFS+ file system decomposes Unicode characters in a special way (NFD normalization). This can cause Git to show octal escapes even with core.quotepath=false. Enable core.precomposeUnicode=true on macOS to handle this: git config --global core.precomposeUnicode true
Terminal Font Requirements: Ensure your terminal uses a Unicode-capable font (Consolas, Lucida Console, DejaVu Sans Mono, or modern monospace fonts). The default Windows console font may not render Unicode correctly.
Locale Settings: If characters still appear escaped, verify your locale supports UTF-8. On Linux/macOS, check echo C.UTF-8—it should include "UTF-8" (e.g., en_US.UTF-8).
Machine-Readable Output: When writing scripts that parse Git output, use the -z flag to get null-terminated, unescaped filenames: git status -z, git diff -z. This avoids ambiguity regardless of quotepath settings.
Known Problematic Encodings: Japanese Shift_JIS and Traditional Chinese Big5 include 0x5c (backslash) as part of multibyte sequences, which can cause round-trip issues with UTF-8. Git checks for these by default.
Run git status again and confirm filenames display properly:
You should now see "café.txt" instead of "caf\303\251.txt".