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

Re: Feature request: number of added and deleted lines for UTF-16 files

From
АТАлександр Третьяк <alextretyak2@gmail.com>
Date
Mar 8, 2020, 21:37 UTC
Message-ID
<CACDhn-R6ZKvgMxJdxP7NpsAViY97PfC7aM8xTJgaQK_GLJRyvQ@mail.gmail.com>
In-Reply-To
<CACDhn-QHqGFhZw+3K61v+Qtmm5y35nARWJaBkZ_YyZevJu8HBQ@mail.gmail.com>
Some source files in MSVC (e.g. resource.h) are encoded in UTF-16 (LE)
with Byte Order Mark (i.e. signature: FF FE for little-endian and FE
FF for big-endian), and `git diff --numstat` shows `-` in place of
number of added/removed lines, e.g.:
-       -       clientapp/resource.h

Can you auto detect UTF-16 by reading first 2 bytes of the file, and correctly show number of lines added/removed?

Next: Torsten Bögershausen
Message 1 of 2 in “Re: Feature request: number of added and deleted lines for UTF-16 files”
  1. Александр ТретьякMar 8, 2020
  2. Torsten BögershausenMar 9, 2020

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.