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

[PATCH] mailinfo: fix 'fatal: cannot convert from utf-8 to utf-8'

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 24, 2007, 00:03 UTC
Message-ID
<Pine.LNX.4.64.0707240102390.14781@racer.site>

For some reason, I got this error message. Maybe it does not make sense, but then we should not really try to convert the text when it is not necessary.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
	This bit me when I tried to apply the most recent Japanese 
	translation patch to git-gui-i18n.
 builtin-mailinfo.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index a37a4ff..b4f6e91 100644
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
@@ -529,6 +529,8 @@ static void convert_to_utf8(char *line, const char *charset)
 			return;
 	}
 
+	if (!strcmp(metainfo_charset, charset))
+		return;
 	out = reencode_string(line, metainfo_charset, charset);
 	if (!out)
 		die("cannot convert from %s to %s\n",
-- 
1.5.3.rc2.32.g35c5b-dirty
Message 1 of 1 in “mailinfo: fix 'fatal: cannot convert from utf-8 to utf-8'”
  1. mailinfo: fix 'fatal: cannot convert from utf-8 to utf-8'Johannes Schindelin, Jul 24, 2007

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.