[PATCH] gitweb: use decode_utf8 directly

STALE3713d

2 messages, 1 author, 2016-06-15 · open the first message on its own page

[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)

Re: [PATCH] gitweb: use decode_utf8 directly

From: Ismail Dönmez <hidden>
Date: 2016-06-15 22:43:07

On Tuesday 24 April 2007 17:05:15 you wrote:
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.
Ping? This patch should be harmless and it fixes a real error, can it be 
applied please?

Regards,
ismail
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help