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

Re: [PATCH v2] git-p4: fix CR LF handling for utf16 files

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 20, 2022, 18:42 UTC
Message-ID
<xmqq7d4739sy.fsf@gitster.g>
In-Reply-To
<pull.1294.v2.git.git.1658341065221.gitgitgadget@gmail.com>
"Moritz Baumann via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 14 quoted lines
> From: Moritz Baumann <moritz.baumann@sap.com>
>
> Perforce silently replaces LF with CR LF for "utf16" files if the client
> is a native Windows client. Since git's autocrlf logic does not undo
> this transformation for UTF-16 encoded files, git-p4 replaces CR LF with
> LF during the sync if the file type "utf16" is detected and the Perforce
> client platform indicates that this conversion is performed.
>
> Windows only runs on little-endian architectures, therefore the encoding
> of the byte stream received from the Perforce client is UTF-16-LE and
> the relevant byte sequence is 0D 00 0A 00.
>
> Signed-off-by: Moritz Baumann <moritz.baumann@sap.com>
> ---
Will queue.  Thanks.
Previous: Moritz Baumann via GitGitGadget
Message 6 of 6 in “git-p4: fix crlf handling for utf16 files on Windows”
  1. git-p4: fix crlf handling for utf16 files on WindowsMoritz Baumann via GitGitGadget, Jul 20, 2022
  2. Junio C HamanoJul 20, 2022
  3. Baumann, MoritzJul 20, 2022
  4. Junio C HamanoJul 20, 2022
  5. git-p4: fix CR LF handling for utf16 filesMoritz Baumann via GitGitGadget, Jul 20, 2022
  6. Junio C HamanoJul 20, 2022

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.