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

Re: Script for handling UTF-16 files

From
KIKen Ismert <kismert@gmail.com>
Date
Apr 11, 2013, 19:11 UTC
Message-ID
<62acca4c-9328-4c38-bf35-6db55d45c895@googlegroups.com>
In-Reply-To
<5165B6AC.5090403@gmail.com>
Karsten, 
There's also an 'encoding' attribute and a 'gui.encoding' setting which in 
> theory should solve your issue (i.e. specify encoding of files for display 
> by GUI tools). I don't know if Git Extensions supports that, or whether its 
> supposed to work for binary files at all. 
>

I played around with this, and neither 'encoding' or 'gui.encoding' solves my problem in Get Extensions or Git Gui.

According to the man page, I would put this entry in my .gitattributes: *.txt encoding=utf-8

This sounds rather tautological -- "Why yes, I do want to display my UTF-16 file as text!"

More to the point, since Git *doesn't know* the original encoding of a 'non-standard' Unicode file, how can it possibly know how to convert it to UTF-8?

So, 'encoding' and 'gui.encoding' seem to be poorly conceived, and certainly aren't helpful for the Windows UTF-16 problem.

-Ken
-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Previous: Karsten Blees
Message 2 of 2 in “Re: Script for handling UTF-16 files”
  1. Karsten BleesApr 10, 2013
  2. Ken IsmertApr 11, 2013

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.