threads / patch / 2031

patchgitk: use UTF-8 encoding

Subject: [PATCH] gitk: use UTF-8 encoding

## tl;dr

4 messages between Oct 6, 2005 and Oct 6, 2005. Diffs are folded; open one to read it.

replies: 3people: 3as markdown or json

Pavel Roskin· Oct 6, 2005, 02:12 UTC · lore

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>
Show changes to gitk +1 −0
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· Oct 6, 2005, 04:19 UTC · re: Pavel Roskin · lore

Re: [PATCH] gitk: use UTF-8 encoding

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· Oct 6, 2005, 05:00 UTC · re: Junio C Hamano · lore

Re: [PATCH] gitk: use UTF-8 encoding

Junio C Hamano wrote:
Show 9 quoted lines
> 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· Oct 6, 2005, 05:34 UTC · re: H. Peter Anvin · lore

Re: [PATCH] gitk: use UTF-8 encoding

On Wed, 2005-10-05 at 22:00 -0700, H. Peter Anvin wrote:
Show 9 quoted lines
> 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

← back to recent threads