i hope you can give me an idea about what's going wrong.

The Szenario:
I run gitweb (CGI) with a script in fastcgi mode:

```
#!/bin/sh
export FCGI_SOCKET_PATH=127.0.0.1:7001
su git -c "/var/www/vh_[vhost]/htdocs/gitweb.cgi --fastcgi &"

```

Then i use nginx to serve that content:

```
...
fastcgi_pass 127.0.0.1:7001; 
...

```

Everything works as expected, but here's the problem:

```
$ wget "http://git.[host].de/?p=[repo].git;a=summary" -O /tmp/test.txt && file --mime-encoding /tmp/test.txt
> /tmp/test.txt: iso-8859-1

$ su git -c "./gitweb.cgi \"?p=[repo].git;a=summary\" > ./test" && file --mime-encoding ./test 
> ./test: utf-8

```

Which obviously means that fast-cgi output is utf8 while content served by nginx is iso-8859-1.

FireBugs Response Header:

```
Server  nginx
Date    Fri, 02 Sep 2011 14:14:08 GMT
Content-Type    application/xhtml+xml; charset=utf-8
Transfer-Encoding   chunked
Connection  close

```

It looks like the transfer using the socket leads to an encoding problem.  

I've tested a lot but can't figure out how to solve this.