diff options
author | Anders Waldenborg <anders@0x63.nu> | 2008-05-21 13:44:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-22 23:03:43 -0700 |
commit | dee2775a29440ca8a52bb5bd09a6de6cd29f69cc (patch) | |
tree | 737d3be88d037168e438763fdf6f3d52e58fab93 /builtin-clean.c | |
parent | 1af8bca79766198c591d8db58f778a98e96627e2 (diff) | |
download | git-dee2775a29440ca8a52bb5bd09a6de6cd29f69cc.tar.gz git-dee2775a29440ca8a52bb5bd09a6de6cd29f69cc.tar.xz |
gitweb: Convert string to 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.
This also have the nice side effect that it actually tries to show the
first 10 _characters_, not the number of characters that happened to fit
into 10 bytes.
Signed-off-by: Anders Waldenborg <anders@0x63.nu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-clean.c')
0 files changed, 0 insertions, 0 deletions