Commit 2ecfcde
gitweb: fix UTF-8 encoding when using CGI::Fast
FCGI streams are implemented using the older stream API: TIEHANDLE,
therefore applying PerlIO layers using binmode() has no effect to them.
The solution in this patch is to redefine the FCGI::Stream::PRINT function
to use UTF-8 as output encoding, except within git_blob_plain() and git_snapshot()
which must still output in raw binary mode.
This problem and solution were previously reported back in 2012:
- http://git.661346.n2.nabble.com/Gitweb-running-as-FCGI-does-not-print-its-output-in-UTF-8-td7573415.html
- http://stackoverflow.com/questions/5005104
Signed-off-by: Julien Moutinho <julm+git@sourcephile.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 0822e66 commit 2ecfcde
1 file changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1291 | 1291 | | |
1292 | 1292 | | |
1293 | 1293 | | |
| 1294 | + | |
1294 | 1295 | | |
1295 | 1296 | | |
1296 | 1297 | | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
1297 | 1311 | | |
1298 | 1312 | | |
1299 | 1313 | | |
| |||
7079 | 7093 | | |
7080 | 7094 | | |
7081 | 7095 | | |
| 7096 | + | |
7082 | 7097 | | |
7083 | 7098 | | |
7084 | 7099 | | |
| |||
7417 | 7432 | | |
7418 | 7433 | | |
7419 | 7434 | | |
| 7435 | + | |
7420 | 7436 | | |
7421 | 7437 | | |
7422 | 7438 | | |
| |||
0 commit comments