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

Re: [PATCH v2] builtin-blame: Reencode commit messages according to git-log rules.

From
Jeff King <peff@peff.net>
Date
Oct 22, 2008, 12:39 UTC
Message-ID
<20081022123926.GA7774@coredump.intra.peff.net>
In-Reply-To
<bb6f213e0810220232p2e7fe3daoa32f46fbe5bef2ac@mail.gmail.com>
On Wed, Oct 22, 2008 at 01:32:56PM +0400, Alexander Gavrilov wrote:
> From the output it seems that what fails is "-f cp1251 -t sjis" and
> "-f utf-8 -t sjis" (remember that blame --incremental produces its

Oh, indeed. Converting to and from utf-8 seems to work, but not between cp1251 and sjis:

  $ iconv -f SJIS -t UTF-8 sjis.txt | sed s/SJIS/UTF8/ >test &&
  >   cmp test utf8.txt && echo ok
  ok
  $ iconv -f UTF-8 -t SJIS utf8.txt | sed s/UTF8/SJIS/ >test &&
  >   cmp test sjis.txt && echo ok
  ok
  $ iconv -f SJIS -t CP1251 sjis.txt
  Not supported SJIS to CP1251
  $ iconv -f CP1251 -t SJIS cp1251.txt
  Not supported CP1251 to SJIS

So I think it is simply a limitation of the platform with respect to the particular encodings used. There is a similar problem in t3900, I think, with EUCJP and ISO-2022-JP. I assume one _can_ install these encodings for Solaris, but the admins of my box haven't done so (and this is a production box that I can't ask for such things on).

> blame for some reason actually tries to convert to an entirely
> different encoding. If tests 4 and 5 pass, you can try adding
> --encoding=shift-jis to test 2 to check it.
Tests 2, 3, and 4 fail. Test 5 does pass.
-Peff
Previous: Alexander GavrilovNext: Junio C Hamano
Message 6 of 13 in “builtin-blame: Reencode commit messages according to git-log rules.”
  1. builtin-blame: Reencode commit messages according to git-log rules.Alexander Gavrilov, Oct 21, 2008
  2. Jeff KingOct 22, 2008
  3. Alexander GavrilovOct 22, 2008
  4. Jeff KingOct 22, 2008
  5. Alexander GavrilovOct 22, 2008
  6. Jeff KingOct 22, 2008
  7. Junio C HamanoOct 22, 2008
  8. Jeff KingOct 22, 2008
  9. Jeff KingOct 22, 2008
  10. Johannes SchindelinOct 22, 2008
  11. Jeff KingOct 22, 2008
  12. Jakub NarebskiOct 22, 2008
  13. Jeff KingOct 22, 2008

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.