# gitweb commitdiff output error

2 messages from 2006-09-28 to 2006-10-03. Participants: Dongsheng Song, Jakub Narebski.
Thread: https://gitlist.dev/t/5732

## Dongsheng Song, 2006-09-28 07:20

Subject: gitweb commitdiff output error
Message-ID: <4b3406f0609280020m43695511qb5da5a3394ad6417@mail.gmail.com>
URL: https://gitlist.dev/e/4b3406f0609280020m43695511qb5da5a3394ad6417%40mail.gmail.com

```
Hi,

When the file enconding is not utf8, the gitweb commitdiff output
error for non-ascii characters.

Can I do iconv for commitdiff  ?

Dongsheng

```

## Jakub Narebski, 2006-10-03 09:01

Subject: Re: gitweb commitdiff output error
Message-ID: <eft8sm$un0$1@sea.gmane.org>
URL: https://gitlist.dev/e/eft8sm%24un0%241%40sea.gmane.org
In-Reply-To: <4b3406f0609280020m43695511qb5da5a3394ad6417@mail.gmail.com>

```
Dongsheng Song wrote:

> When the file enconding is not utf8, the gitweb commitdiff output
> error for non-ascii characters.
> 
> Can I do iconv for commitdiff  ?

You can, most probably, but perhaps not as something that is universal.
In git you can set commit message encoding, but git does not remember
(and has no set place where to save it) information about file encoding.
You would have either use default UTF-8 encoding of gitweb page, and do
iconv equivalent, by using "encoding" module and/or "Encode" module,
and by opening diff with "-|:encoding(utf16)" (where of course you have
to put correct encoding). And you would have to set default file encoding
(and perhaps filename encoding) somewhere.

Still, it wouldn't help for example diff of encoding _change_...
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

```
