Re: [PATCH (GIT-GUI,GITK) 1/8] git-gui: Cleanup handling of the default encoding.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 18, 2008 at 06:29:26PM +0200, Johannes Sixt wrote:
> 
> By setting the encoding to "system", "the default" is taken from whatever
> the system's current locale is. If you are on modern Linux, your locale is
> most likely set to UTF8, and everything is fine; you won't observe a
> change in behavior.

That's right.

> But if you are on a system whose locale was not set to UTF8, then you very
> likely did *not* produce UTF8 data, and the display in git-gui was screwed
> because it assumed UTF8. With this change it uses the system's encoding,
> and it is an improvement.

It is not about how data are stored locale but what is in repository.
Even if you still have some Linux box with legacy encoding on it, you
still want to see what in repository, which is mostly likely to be in
UTF-8. Even if you do not have UTF-8 locale, all decent editors are
capable to read and store files in UTF-8 (even if it is not your locale),
and it is really make sense to store files in UTF-8, which makes sense
because you are going then on a modern Linux, you want to have all data
in the repository to be in a single encoding, and UTF-8 is the best
choice for that.

> 
> > 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.
> 
> How can you know? For example, I've to work with systems that use "legacy
> encodings", and I can't use UTF8 in my data. Hence, the default of UTF8
> was not exactly useful. With this patch series there's now a mechanism
> that allows me to state the encoding per file, and all platforms should be
> able to show the data in the correct way.

This patch is certainly a big improvement, as it allows to choose what
encoding you want to see, but I was not sure that changing the default
from UTF-8 to the system locale is really a good idea for anything but
Windows specific projects. Anyway, I have converted all computers that
I use regularly to UTF-8, so I don't really care...

Dmitry
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux