Re: Recoding of {git,cg}-log output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear diary, on Mon, Feb 27, 2006 at 01:10:44AM CET, I got a letter
where Krzysiek Pawlik <krzysiek.pawlik@xxxxxxxxx> said that...
> 
> 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?

> 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
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]