Skip to contentSkip to conversation

gitk: use UTF-8 encoding

PATCH In review Pavel Roskin 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gitk: use UTF-8 encoding

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

gitk +1 -0
@@ -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
Signature · 2 lines
Regards,
Pavel Roskin
#1 lore raw
Quoted 2 lines · Pavel Roskin

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?

#2 lore raw
Quoted 9 lines · Junio C Hamano
Quoted 2 lines · Pavel Roskin

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

#3 lore raw
Quoted 9 lines · H. Peter Anvin
Quoted 8 lines · Junio C Hamano
Quoted 2 lines · Pavel Roskin

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.

Quoted 2 lines

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.

Signature · 2 lines
Regards,
Pavel Roskin