Re: [PATCH (GIT-GUI,GITK) 1/8] git-gui: Cleanup handling of the default encoding.
From: Alexander Gavrilov <hidden>
Date: 2016-06-15 22:45:22
On Thu, Sep 18, 2008 at 7:02 PM, Dmitry Potapov [off-list ref] wrote:
The subject line of this patch is a bit misleading. I would not expect from "clean up" to change the existing behavior and existing default.
Comments can be easily changed.
quoted
The rationale for this is Windows support: 1) Windows people are accustomed to using legacy encodings for text files. For many of them defaulting to utf-8 will be counter-intuitive. 2) Windows doesn't support utf-8 locales, and switching the system encoding is a real pain. Thus the option.I don't care much what is the default for Windows, but I wonder whether this rationale is good enough to change the default for other platforms. If you have systems configured with utf-8 and others (usually old ones) with legacy encoding, you will store files in utf-8 in your repo, thus having utf-8 as the default makes sense for non-Windows platforms.
In fact, I think that the only reasonable default is the locale encoding. If they want something different, they can do "git config --global gui.encoding utf-8", that's what the option is there for.
BTW, when you said the system encoding above, what exactly encoding do you mean? AFAIK, Windows has two legacy encodings OEM-CP and ANSI-CP. If I write a console program and compile it using MS-VC then it should use OEM-CP. However, if you write a GUI program or a console program that is compiled using gcc from Cygwin, you have to use ANSI-CP. For instance, if you use the Russian locale on Windows, ASNI-CP is 1251 and OEM-CP is 866. So, my question is what exactly encoding do you call as "system" above?
Whatever Tcl thinks the system encoding is. In this case it is cp1251. CP866 is for DOS. Alexander