Re: Possible regression in git-rev-list --header
- From
- Marco Costalba <mcostalba@gmail.com>
- Date
- Jan 2, 2007, 22:29 UTC
- Message-ID
- <e5bfff550701021429j1587949fgfe19effcaf74e6df@mail.gmail.com>
- In-Reply-To
- <7vps9xrs9y.fsf@assigned-by-dhcp.cox.net>
On 1/2/07, Junio C Hamano <junkio@cox.net> wrote:
Show 10 quoted lines
> > > And Marco has to fix the header parsing anyway. > > No question about that. If iconv() punts, qgit will see > "encoding" header to deal with even when the re-coding is in > effect. I think it may be a sensible thing for qgit to replace > the log message and show "log message in this encoding, which > cannot be shown in this window" instead in such a case, but that > is up to Porcelain. >
Yes, git-rev-list output is stored in memory as a big chunk of row bytes, conversion to utf8 (the internal format used by Qt string class) is done _only_ for displayed items, just before to show them to user so is not performance critical. I agree with Junio, that info could be used to teach Qt string conversion function how to handle the data. Something like:
convertWithCodec(const char* data, codec* codecName)
So perhaps if Qt is better then iconv we could display a good log message anyway.