login
Header Space

 
 

Re: [PATCH] gitweb: Fix chop_str not to cut in middle of utf8 multibyte chars.

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Anders Waldenborg <anders@...>
Cc: <git@...>
Date: Tuesday, May 20, 2008 - 6:19 pm

Anders Waldenborg <anders@0x63.nu> writes:


Thanks a lot.  This is certainly a good thing, although I think that
the proper solution (but which would need much more work) would be to
ensure that all information is stored in Perl internal form, and not
only ensured on output.

I would change title of this commit to be more descriptive what this
commit does; or rather make current subject the first sentence of
commit summary, have something like the following for commit message:

gitweb: Convert string to Perl internal form before chopping in chop_str

Fix chop_str not to cut in middle of utf8 multibyte chars.  Without
this fix at least author name in short log may cut in middle of a
multibyte char. When the result comes to esc_html to_utf8 is called
again, which doesn't find valid utf8 and decodes using
$fallback_encoding making it even worse.
 

I like the comment here. It explains the whys of code.


This patch is whitespace damaged, by the way.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] gitweb: Fix chop_str not to cut in middle of utf8 mu..., Anders Waldenborg, (Tue May 20, 4:55 pm)
Re: [PATCH] gitweb: Fix chop_str not to cut in middle of utf..., Jakub Narebski, (Tue May 20, 6:19 pm)
[PATCH] gitweb: Convert string to internal form before chopp..., Anders Waldenborg, (Wed May 21, 7:44 am)
speck-geostationary