git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git format-patch displays weird chars when filename includes non-ascii chars

From
YYongmin <revi@omglol.email>
Date
May 14, 2024, 15:31 UTC
Message-ID
<ea41a92d-35df-4b71-be70-a736d620b21f@app.fastmail.com>
Hi everybody,
When the file name has non-ascii characters, the file name gets mangled somehow. Is this anything from my config side error or something gone weird with git?
 Steps to reproduce;
$ git init
$ echo 'BlahBlah' > 테스트.txt
$ git add 테스트.txt
$ git commit -m 'test commit'
$ git format-patch --root
0001-test-commit.patch
$ cat 0001-test-commit.patch
From d2aa2b2f5aa290edec6a5fd141318a479ac9de8e Mon Sep 17 00:00:00 2001
From: Yongmin Hong <revi@omglol.email>
Date: Tue, 14 May 2024 15:15:52 +0000
Subject: [PATCH] test commit

--- "\355\205\214\354\212\244\355\212\270.txt" | 1 + 1 file changed, 1 insertion(+) create mode 100644 "\355\205\214\354\212\244\355\212\270.txt"

diff --git "a/\355\205\214\354\212\244\355\212\270.txt" "b/\355\205\214\354\212\244\355\212\270.txt"
new file mode 100644
index 0000000..86724be
--- /dev/null
+++ "b/\355\205\214\354\212\244\355\212\270.txt"
@@ -0,0 +1 @@
+BlahBlah
-- 
2.32.7

I searched a bit with the keyword 'format-patch ascii' but couldn't find anything useful.
Thanks in advance!
----
revi | 레비
- [he/him](https://en.pronouns.page/@revi)
- [What time is it in my timezone](https://issuetracker.revi.xyz/u/time)
https://revi.xyz
Next: brian m. carlson
Message 1 of 4 in “git format-patch displays weird chars when filename includes non-ascii chars”
  1. YongminMay 14, 2024
  2. brian m. carlsonMay 14, 2024
  3. Junio C HamanoMay 14, 2024
  4. YongminMay 15, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.