Commit 474c4753 474c4753f36e005df0ac71855d1e70a8d3e38d1d by Wojciech Polak

(util_rfc2047_decode): Test LANG if LC_ALL is null.

1 parent 4d8e49c7
1 /* GNU Mailutils -- a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002, 2003,
3 2004 Free Software Foundation, Inc.
3 4
4 GNU Mailutils is free software; you can redistribute it and/or modify 5 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
...@@ -1339,9 +1340,12 @@ util_rfc2047_decode (char **value) ...@@ -1339,9 +1340,12 @@ util_rfc2047_decode (char **value)
1339 return; 1340 return;
1340 if (strcasecmp (charset, "auto") == 0) 1341 if (strcasecmp (charset, "auto") == 0)
1341 { 1342 {
1342 /* Try to deduce the charset from LC_ALL variable */ 1343 /* Try to deduce the charset from LC_ALL or LANG variables */
1343 1344
1344 tmp = getenv ("LC_ALL"); 1345 tmp = getenv ("LC_ALL");
1346 if (!tmp)
1347 tmp = getenv ("LANG");
1348
1345 if (tmp) 1349 if (tmp)
1346 { 1350 {
1347 char *sp; 1351 char *sp;
......