diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2008-09-18 01:07:32 +0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-09-24 12:48:32 -0700 |
commit | 72e6b002021e45255f568fc0c885d82de75ae935 (patch) | |
tree | fb76f3bbe6e8006a6aca0ee59d6a2f1b51247904 /lib/blame.tcl | |
parent | git-gui: Assume `blame --incremental` output is in UTF-8 (diff) | |
download | tgif-72e6b002021e45255f568fc0c885d82de75ae935.tar.xz |
git-gui: Cleanup handling of the default encoding.
- Make diffs and blame default to the system (locale)
encoding instead of hard-coding UTF-8.
- Add a gui.encoding option to allow overriding it.
- gitattributes still have the final word.
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.
This patch also adds proper encoding conversion to Apply Hunk/Line.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Tested-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib/blame.tcl')
-rw-r--r-- | lib/blame.tcl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/blame.tcl b/lib/blame.tcl index 7535adb97d..84d55b5828 100644 --- a/lib/blame.tcl +++ b/lib/blame.tcl @@ -402,7 +402,7 @@ method _load {jump} { fconfigure $fd \ -blocking 0 \ -translation lf \ - -encoding [tcl_encoding [gitattr $path encoding UTF-8]] + -encoding [get_path_encoding $path] fileevent $fd readable [cb _read_file $fd $jump] set current_fd $fd } |