Page MenuHome GnuPG

UTF-8 handling in the command line
Closed, ResolvedPublic


I think that the change of rG99c9bf7defd6: common: Assume an utf-8 locale on iconv errors. is not sufficient but requires more change to no_translation=1, as no_translation = 0 && use_iconv = 0 means iso-8859-1 conversion in utf8conv.c.

Event Timeline

I mean:

diff --git a/common/utf8conv.c b/common/utf8conv.c
index 7804dbfcd..bdab225a9 100644
--- a/common/utf8conv.c
+++ b/common/utf8conv.c
@@ -138,7 +138,7 @@ handle_iconv_error (const char *to, const char *from, int use_fallback)
          native encoding.  Nowadays this seems to be the best bet in
          case of errors from iconv or nl_langinfo.  */
       active_charset_name = "utf-8";
-      no_translation = 0;
+      no_translation = 1;
       use_iconv = 0;
werner triaged this task as Normal priority.Aug 29 2020, 5:19 PM
werner added a project: backport.
werner added a subscriber: werner.

This has been fixed for Unix on 2.2 and 2.3. The command line fix for Windows is a larger thing already tracked by T4398.