utf 8 - NGINX, FastCGI, UTF-8 Encoding: Output iso-8859-1 instead of utf8 -


I hope you can give me an idea of ​​what is going wrong.

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

  #! / Bin / sh Export FCGI_SOCKET_PATH = 127.0.0.1: 7001 Su GIT-C "/ var / www / vh_ [vhost] / htdocs /gitweb.cgi --fastcgi and"   

Then I I use nginx to serve the 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 / testtacks & amp; File - MME-encoding /tmp/test.txt & gt; /tmp/test.txt: iso-8859-1 $ su git -c "./gitweb.cgi \"? P = [repo] .git; A = summary \ "& gt; ./test" & amp; Amp; File - MME-encoding ./test & gt; ./test: utf-8   

Clearly, the faster CGI output is UTF 8, whereas the content made by NGN iso-8859-1 is

FireBugs Response Header: server nginx Date Fri, 02 Sep 2011 14:14:08 GMT Content Type App / XHTML + xml; Charset = utf-8 transfer encoding peeling connections closed

It seems that the transfer using the socket leads to the encoding problem.
I have done a lot of testing how to solve it.

Although you are not using PHP, I found a solution to my problem but wrapping the pieces to the ISO -885 9-1 is being highlighted as: utf8_encode () :

If your CGI is in Perl, then your problem may be resolved. This is my solution ... Z�rich

Another option may be to add the following to the http {} statement in your nginx.conf:

  Charset UTF-8;   

-sd

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -