# Re: [PATCH] gitweb: use decode_utf8 directly

1 messages from 2007-06-01 to 2007-06-01. Participants: Martin Koegler.
Thread: https://gitlist.dev/t/8384

## Martin Koegler, 2007-06-01 16:13

Subject: Re: [PATCH] gitweb: use decode_utf8 directly
Message-ID: <20070601161316.GA19526@auto.tuwien.ac.at>
URL: https://gitlist.dev/e/20070601161316.GA19526%40auto.tuwien.ac.at

```
Alexandre Julliard wrote:
>Junio C Hamano <junkio@cox.net> writes:
> > I would say that the patch is an improvement from the current
> > code so it should hit 'master'; I was a bit busy lately and then
> > am sick, and also we are post -rc1 freeze now and I was being
> > cautious, just in case some nacks from more informed parties
> > arrive late.
> 
> Sorry for the late nack, but it turns out that this patch breaks diff
> output on the Wine server for files that are not utf-8.
> 
> The cause is apparently that decode_utf8() returns undef for invalid
> sequences instead of substituting a replacement char like
> decode("utf8") does.
> 
> That may be considered an Encode bug since we are running a fairly old
> version (1.99, coming with Debian 3.1), but I'd rather not upgrade
> perl on the server. Could the patch be reverted, or done differently?

I hit the same problem:
http://marc.info/?l=git&m=117978122420441&w=2

On my system, I use this patch as workaround:
http://marc.info/?l=git&m=118038526531694&w=2

mfg Martin Kögler

```
