aboutsummaryrefslogtreecommitdiff
path: root/iconv/iconv_prog.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconv/iconv_prog.c')
-rw-r--r--iconv/iconv_prog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
index baeec79c94..f7aa340321 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -25,6 +25,7 @@
#include <error.h>
#include <fcntl.h>
#include <iconv.h>
+#include <langinfo.h>
#include <locale.h>
#include <search.h>
#include <stdio.h>
@@ -220,7 +221,8 @@ main (int argc, char *argv[])
if (errno == EINVAL)
error (EXIT_FAILURE, 0,
_("conversion from `%s' to `%s' not supported"),
- from_code, orig_to_code);
+ from_code[0] ? from_code : nl_langinfo (CODESET),
+ orig_to_code[0] ? orig_to_code : nl_langinfo (CODESET));
else
error (EXIT_FAILURE, errno,
_("failed to start conversion processing"));