# [PATCH] gitk: use UTF-8 encoding

4 messages from 2005-10-06 to 2005-10-06. Participants: Pavel Roskin, Junio C Hamano, H. Peter Anvin.
Thread: https://gitlist.dev/t/2031

## Pavel Roskin, 2005-10-06 02:12

Subject: [PATCH] gitk: use UTF-8 encoding
Message-ID: <1128564768.32103.18.camel@dv>
URL: https://gitlist.dev/e/1128564768.32103.18.camel%40dv

```
gitk should try to use UTF-8 encoding for system operations, such as
reading and writing files and git output.

Signed-off-by: Pavel Roskin <proski@gnu.org>

diff --git a/gitk b/gitk
--- a/gitk
+++ b/gitk
@@ -3726,6 +3726,7 @@ set colors {green red blue magenta darkg
 
 catch {source ~/.gitk}
 
+catch {encoding system utf-8}
 set namefont $mainfont
 if {$boldnames} {
     lappend namefont bold


-- 
Regards,
Pavel Roskin

```

## Junio C Hamano, 2005-10-06 04:19

Subject: Re: [PATCH] gitk: use UTF-8 encoding
Message-ID: <7vvf0b9t0d.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vvf0b9t0d.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <1128564768.32103.18.camel@dv>

```
Pavel Roskin <proski@gnu.org> writes:

> gitk should try to use UTF-8 encoding for system operations, such as
> reading and writing files and git output.

I agree about commit messages, but I am not so sure about the
file contents (aka user data).  Is it possible to control them
separately?

```

## H. Peter Anvin, 2005-10-06 05:00

Subject: Re: [PATCH] gitk: use UTF-8 encoding
Message-ID: <4344AF8A.1040504@zytor.com>
URL: https://gitlist.dev/e/4344AF8A.1040504%40zytor.com
In-Reply-To: <7vvf0b9t0d.fsf@assigned-by-dhcp.cox.net>

```
Junio C Hamano wrote:
> Pavel Roskin <proski@gnu.org> writes:
> 
>>gitk should try to use UTF-8 encoding for system operations, such as
>>reading and writing files and git output.
> 
> I agree about commit messages, but I am not so sure about the
> file contents (aka user data).  Is it possible to control them
> separately?
> 

git needs to be able to treat user data as arbitrary binary blobs. 
However, if interpreting as text, UTF-8 is the right default, at least.

	-hpa

```

## Pavel Roskin, 2005-10-06 05:34

Subject: Re: [PATCH] gitk: use UTF-8 encoding
Message-ID: <1128576895.31571.8.camel@dv>
URL: https://gitlist.dev/e/1128576895.31571.8.camel%40dv
In-Reply-To: <4344AF8A.1040504@zytor.com>

```
On Wed, 2005-10-05 at 22:00 -0700, H. Peter Anvin wrote:
> Junio C Hamano wrote:
> > Pavel Roskin <proski@gnu.org> writes:
> > 
> >>gitk should try to use UTF-8 encoding for system operations, such as
> >>reading and writing files and git output.
> > 
> > I agree about commit messages, but I am not so sure about the
> > file contents (aka user data).  Is it possible to control them
> > separately?

Yes.  "encoding convertfrom" should do the trick.  In some projects, 
there may be files written in different encodings, such as gettext *.po
files.  A patch updating several *.po files would have different parts
in different encodings.

I think gitk could have a submenu in the popup menu with the encodings
to chose from.

> git needs to be able to treat user data as arbitrary binary blobs. 
> However, if interpreting as text, UTF-8 is the right default, at least.

I agree.

-- 
Regards,
Pavel Roskin

```
