git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH (GITK) v2 0/4] Encoding support in GUI

From
Alexander Gavrilov <angavrilov@gmail.com>
Date
Sep 30, 2008, 11:00 UTC
Message-ID
<1222772422-28020-1-git-send-email-angavrilov@gmail.com>

Currently GUI tools don't provide enough support for viewing files that contain non-ASCII characters. This set of patches addresses this issue. The git-gui part of the series is based on patches that were in the 'pu' branch of the git-gui repository.

UPDATE: the git-gui part of the series is in master.
File encoding can be specified in the following ways:
1) It defaults to the current locale encoding.
2) It can be overridden by setting the gui.encoding option.
3) It can be further set on per-file basis by specifying
   the 'encoding' attribute in gitattributes.
4) Finally, git-gui allows directly selecting encodings
   through a popup menu.

Since git apparently cannot work with filenames in non-locale encodings anyway, I did not try to do anything about it apart from fixing some obvious bugs.

CHANGES:
- Wrote better comments for the first three patches.
- Added a patch to speed up loading of very large diffs.
GITK:
	gitk: Port new encoding logic from git-gui.
	---
	gitk |   50 +++++++++++++++++++++++++++++++++++++++++++++++---
	1 files changed, 47 insertions(+), 3 deletions(-)
	gitk: Implement file contents encoding support.
	---
	gitk |   19 ++++++++++++++++---
	1 files changed, 16 insertions(+), 3 deletions(-)
	gitk: Support filenames in the locale encoding.
	---
	gitk |   16 +++++++++++-----
	1 files changed, 11 insertions(+), 5 deletions(-)
	gitk: Implement batch lookup and caching of encoding attrs.
	---
	gitk |   35 ++++++++++++++++++++++++++++++++++-
	1 files changed, 34 insertions(+), 1 deletions(-)
Next: Alexander Gavrilov
Message 1 of 12 in “Encoding support in GUI”
  1. 0/4 Encoding support in GUIAlexander Gavrilov, Sep 30, 2008
  2. 1/4 gitk: Port new encoding logic from git-gui.Alexander Gavrilov, Sep 30, 2008
  3. 2/4 gitk: Implement file contents encoding support.Alexander Gavrilov, Sep 30, 2008
  4. 3/4 gitk: Support filenames in the locale encoding.Alexander Gavrilov, Sep 30, 2008
  5. 4/4 gitk: Implement batch lookup and caching of encoding attrs.Alexander Gavrilov, Sep 30, 2008
  6. Paul MackerrasOct 10, 2008
  7. Alexander GavrilovOct 10, 2008
  8. Paul MackerrasOct 11, 2008
  9. Alexander GavrilovOct 11, 2008
  10. Paul MackerrasOct 11, 2008
  11. Paul MackerrasOct 10, 2008
  12. Paul MackerrasOct 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.