Re: [PATCH] gitweb: use decode_utf8 directly
- From
- Ismail Dönmez <ismail@pardus.org.tr>
- Date
- Apr 27, 2007, 08:55 UTC
- Message-ID
- <200704271155.24304.ismail@pardus.org.tr>
- In-Reply-To
- <200704241705.19661.ismail@pardus.org.tr>
On Tuesday 24 April 2007 17:05:15 you wrote:
Show 25 quoted lines
> 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