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

Re: help request: unable to merge UTF-16-LE "text" file

From
MLMichael Litwak <michael.litwak@nuix.com>
Date
Jan 12, 2024, 20:34 UTC
Message-ID
<SJ0PR10MB569341D4236E1438E49EA1D9FA6F2@SJ0PR10MB5693.namprd10.prod.outlook.com>

This is in reply to the message at https://lore.kernel.org/all/20220422184211.5z67sxrgq2zm3tvd@compass/#t

Sent via MS Outlook - hope this reaches the online thread.
------------------------------------------------------------------------
On Windows, if you do
    git add

from an ordinary Command Prompt, it will fail to call iconv.exe to perform the necessary text conversion. I.E. your UTF-16LE with BOM file will not be properly converted by Git to UTF-8 for its internal storage, leading to subsequent encoding errors.

So, in addition to setting the working-tree-encoding of the file to UTF-16LE-BOM in .gitattributes prior to adding the file, be sure to run:

    git add   
from a git bash console when adding such files.
- Michael
Message 1 of 1 in “Re: help request: unable to merge UTF-16-LE "text" file”
  1. Michael LitwakJan 12, 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.