{"thread":{"id":"55441","subject":"Subject: Encoding of git diff --name-only stdout","startedAt":"2021-04-06T12:21:30Z","lastAt":"2021-04-06T14:54:16Z","messageCount":2,"participants":["Andrey Bienkowski","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"421058","messageId":"CAAunPhfjUSO0Po4sO7Hwxjq7_p0ke7VOD=XRizG1Fqkzymcgmg@mail.gmail.com","threadId":"55441","inReplyTo":null,"subject":"Subject: Encoding of git diff --name-only stdout","fromName":"Andrey Bienkowski","fromEmail":"hexagonrecursion@gmail.com","sentAt":"2021-04-06T12:20:45Z","receivedAt":"2021-04-06T12:21:30Z","isPatch":false,"sender":{"key":"hexagonrecursion@gmail.com","avatar":"https://avatars.githubusercontent.com/u/52621858?v=4"},"body":"Hi. I want to parse the output of git diff --name-only and git diff\n--name-status, but the documentation https://git-scm.com/docs/git-diff\ndoes not say what encoding it is in. Is it always utf8 on all\nplatforms? If not is there a flag to make it so? Once I get an answer\nto this question I'll submit a PR to add the missing documentation.\n-- Andrey Bienkowski\n"},{"id":"421068","messageId":"YGx2EMHnwXWbp4ET@coredump.intra.peff.net","threadId":"55441","inReplyTo":"CAAunPhfjUSO0Po4sO7Hwxjq7_p0ke7VOD=XRizG1Fqkzymcgmg@mail.gmail.com","subject":"Re: Subject: Encoding of git diff --name-only stdout","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2021-04-06T14:54:08Z","receivedAt":"2021-04-06T14:54:16Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Apr 06, 2021 at 12:20:45PM +0000, Andrey Bienkowski wrote:\n\n> Hi. I want to parse the output of git diff --name-only and git diff\n> --name-status, but the documentation https://git-scm.com/docs/git-diff\n> does not say what encoding it is in. Is it always utf8 on all\n> platforms? If not is there a flag to make it so? Once I get an answer\n> to this question I'll submit a PR to add the missing documentation.\n\nThere's some discussion in Documentation/i18n.txt, which is included in\nvarious manpages (e.g., https://git-scm.com/docs/git-log#_discussion)\nbut it doesn't seem to be mentioned in git-diff.\n\nThe short answer is: mostly utf8, but historically on platforms that\ndon't care (like Linux) you could get away with other encodings.\n\n-Peff\n"}]}