From: Nguyễn Thái Ngọc Duy Date: Thu, 18 Apr 2013 23:08:47 +0000 (+1000) Subject: pretty: two phase conversion for non utf-8 commits X-Git-Tag: v1.8.3-rc0~22^2~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/7e77df39bf20f04b266f394a64c2fca54c1e5db0?hp=7e77df39bf20f04b266f394a64c2fca54c1e5db0 pretty: two phase conversion for non utf-8 commits Always assume format_commit_item() takes an utf-8 string for string handling simplicity (we can handle utf-8 strings, but can't with other encodings). If commit message is in non-utf8, or output encoding is not, then the commit is first converted to utf-8, processed, then output converted to output encoding. This of course only works with encodings that are compatible with Unicode. This also fixes the iso8859-1 test in t6006. It's supposed to create an iso8859-1 commit, but the commit content in t6006 is in UTF-8. t6006 is now converted back in UTF-8 (the downside is we can't put utf-8 strings there anymore). Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano ---