diff options
author | Werner Koch <[email protected]> | 2015-08-31 18:29:28 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-09-01 05:37:12 +0000 |
commit | 99c9bf7defd6c1ac9cc49c84e6c78eeb886a6952 (patch) | |
tree | 9b6ae55790eb1f35075cd732cfe68544a50aacb9 /common/utf8conv.c | |
parent | common: Fix regression in building argpase.c standalone. (diff) | |
download | gnupg-99c9bf7defd6c1ac9cc49c84e6c78eeb886a6952.tar.gz gnupg-99c9bf7defd6c1ac9cc49c84e6c78eeb886a6952.zip |
common: Assume an utf-8 locale on iconv errors.
* common/utf8conv.c (handle_iconv_error): Use utf-8 as fallback.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/utf8conv.c')
-rw-r--r-- | common/utf8conv.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/common/utf8conv.c b/common/utf8conv.c index 99cfc2d6d..a912b82ee 100644 --- a/common/utf8conv.c +++ b/common/utf8conv.c @@ -127,12 +127,10 @@ handle_iconv_error (const char *to, const char *from, int use_fallback) if (use_fallback) { - /* To avoid further error messages we fallback to Latin-1 for the - native encoding. This is justified as one can expect that on a - utf-8 enabled system nl_langinfo() will work and thus we won't - never get to here. Thus Latin-1 seems to be a reasonable - default. */ - active_charset_name = "iso-8859-1"; + /* To avoid further error messages we fallback to UTF-8 for the + 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; use_iconv = 0; } |