[PATCH] gitweb: use decode_utf8 directly
From: Ismail Dönmez <hidden>
Date: 2016-06-15 22:43:06
Hi,
gitweb currently uses Encode::decode function with a wrapper like this :
# very thin wrapper for decode("utf8", $str, Encode::FB_DEFAULT);
sub to_utf8 {
my $str = shift;
return decode("utf8", $str, Encode::FB_DEFAULT);
}
But for me this gives the following error when I try to view RSS feed for
Linux kernel GIT repo (local checkout) :
Cannot decode string with wide characters
at /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/Encode.pm line 162.
I Google'd a bit but the relevant information seems to be missing about this
error. Anyhow there is no need for a wrapper at all as Encode class has a
decode_utf8 function which fixes the problem I am experiencing too and chops
off the unneeded wrapper.
Patch against git 1.5.1.2 is attached. Comments welcome.
P.S: I am using Encode 2.20 from CPAN which is the latest stable version
available.
Regards,
ismail
--
Life is a game, and if you aren't in it to win,
what the heck are you still doing here?
-- Linus Torvalds (talking about open source development)