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

Re: gitweb commitdiff output error

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 3, 2006, 09:01 UTC
Message-ID
<eft8sm$un0$1@sea.gmane.org>
In-Reply-To
<4b3406f0609280020m43695511qb5da5a3394ad6417@mail.gmail.com>
Dongsheng Song wrote:
> When the file enconding is not utf8, the gitweb commitdiff output
> error for non-ascii characters.
> 
> Can I do iconv for commitdiff  ?

You can, most probably, but perhaps not as something that is universal. In git you can set commit message encoding, but git does not remember (and has no set place where to save it) information about file encoding. You would have either use default UTF-8 encoding of gitweb page, and do iconv equivalent, by using "encoding" module and/or "Encode" module, and by opening diff with "-|:encoding(utf16)" (where of course you have to put correct encoding). And you would have to set default file encoding (and perhaps filename encoding) somewhere.

Still, it wouldn't help for example diff of encoding _change_...
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Dongsheng Song
Message 2 of 2 in “gitweb commitdiff output error”
  1. Dongsheng SongSep 28, 2006
  2. Jakub NarebskiOct 3, 2006

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.