Re: Recoding of {git,cg}-log output
- From
Petr Baudis <pasky@suse.cz>
- Date
- Feb 27, 2006, 01:26 UTC
- Message-ID
- <20060227012656.GX31278@pasky.or.cz>
- In-Reply-To
- <44024384.4060406@people.pl>
Dear diary, on Mon, Feb 27, 2006 at 01:10:44AM CET, I got a letter where Krzysiek Pawlik <krzysiek.pawlik@people.pl> said that...
Show 9 quoted lines
> > First: a little "why": having /usr/bin/vim as PAGER allows to enter > UTF-8 commit messages quite easily, the problem is when git-log (or > cg-log) is run in terminal that's not UTF-8. In my case: terminal is > ISO-8859-2 and: > > nelchael@nelchael ~$ cat ~/.vimrc | grep gitci > au BufRead /tmp/gitci* setlocal textwidth=75 fileencoding=utf-8 > encoding=utf-8 fileencodings=utf-8,default
Wouldn't it be enough to also set termencoding?
Show 11 quoted lines
> So... having {git,cg}-log recode the log entires when displaying is
> quite useful. Two patches attached:
>
> a. git-log-recode.patch - uses iconv to recode the log output to
> GIT_LOG_RECODE encoding
> b. cg-log-recode.patch - the same, but for cogito
>
> With this patches it's possible to write UTF-8 commit messages and see
> them ok in non-UTF-8 terminal in log by having GIT_LOG_RECODE=iso-8859-2.
>
> Comments?Not opposed in principle. But it would be much more sensible to have something like $GIT_META_ENCODING (defaulting probably to utf8), recode to whatever is your current locale, have the appropriate setting in the configfile, ...
-- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ Of the 3 great composers Mozart tells us what it's like to be human, Beethoven tells us what it's like to be Beethoven and Bach tells us what it's like to be the universe. -- Douglas Adams