gitweb: Fix handling of non-ASCII characters in inserted HTML files
gitweb: Fix handling of non-ASCII characters in inserted HTML files

Use new insert_file() subroutine to insert HTML chunks from external
files: $site_header, $home_text (by default indextext.html),
$site_footer, and $projectroot/$project/REAME.html.

All non-ASCII chars of those files will be broken by Perl IO layer
without decoding to utf8, so insert_file() does to_utf8() on each
printed line; alternate solution would be to open those files with
"binmode $fh, ':utf8'", or even all files with "use open qw(:std :utf8)".

Note that inserting README.html lost one of checks for simplicity.

Noticed-by: Tatsuki Sugiura <1d4c8d73a33e42bcbc46586bc8e230a85ad2143c@nemui.org>
Signed-off-by: Jakub Narebski <a6a1517a087f9f64a72f41a0de57ff01fbb0e412@gmail.com>
Signed-off-by: Junio C Hamano <a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git