git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitweb: use decode_utf8 directly

From
IDIsmail Dönmez <ismail@pardus.org.tr>
Date
Apr 27, 2007, 09:22 UTC
Message-ID
<200704271223.03468.ismail@pardus.org.tr>
In-Reply-To
<7v1wi6p4lt.fsf@assigned-by-dhcp.cox.net>
On Friday 27 April 2007 12:07:58 you wrote:
Show 35 quoted lines
> Ismail Dönmez <ismail@pardus.org.tr> writes:
> >> 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?
>
> I cannot tell if it is harmless.  The original used
>
> 	decode("utf8", $str, Encode::FB_DEFAULT);
>
> and you made them to:
>
> 	decode_utf8($str);
>
> According to the documentation, decode_utf8($octets [,CHECK])
> should be equivalent to decode("utf8", $octets [,CHECK]), and
> the documentation further says that without CHECK, these
> functions assume Encode::FB_DEFAULT; in other words, these two
> should be equivalent.
>
> Which means that there is something else going on.  Your change
> may fix what you observed (I do not doubt that it fixed what you
> observed for you), but without understanding what really is
> going on (iow, why it is a fix, when the documentation clearly
> indicates they should be equivalent and it should not fix
> anything), we cannot tell what *ELSE* we are breaking with this
> change.
That might be a bug in Encode itself indeed, I will dig a bit more. Thanks.

Regards, ismail

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 21 in “gitweb: use decode_utf8 directly”
  1. gitweb: use decode_utf8 directlyIsmail Dönmez, Apr 24, 2007
  2. Ismail DönmezApr 27, 2007
  3. Junio C HamanoApr 27, 2007
  4. Ismail DönmezApr 27, 2007
  5. Junio C HamanoApr 27, 2007
  6. Ismail DönmezMay 1, 2007
  7. Junio C HamanoMay 1, 2007
  8. Ismail DönmezMay 1, 2007
  9. Ismail DönmezMay 1, 2007
  10. Ismail DönmezMay 3, 2007
  11. Junio C HamanoMay 3, 2007
  12. Alexandre JulliardJun 1, 2007
  13. Ismail DönmezJun 1, 2007
  14. Alexandre JulliardJun 1, 2007
  15. Junio C HamanoJun 1, 2007
  16. Ismail DönmezJun 1, 2007
  17. Junio C HamanoJun 1, 2007
  18. Ismail DönmezJun 1, 2007
  19. Junio C HamanoJun 3, 2007
  20. Ismail DönmezJun 3, 2007
  21. Jakub NarebskiJun 2, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.