mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
iconv: restore verbosity with unrecognized encoding names (bug 30694)
Commit 91927b7c76
("Rewrite iconv option parsing [BZ #19519]") changed the
iconv program to call __gconv_open directly instead of the iconv_open
wrapper, but the former does not set errno. Update the caller to
interpret the return codes like iconv_open does.
This commit is contained in:
parent
78ceef25d6
commit
fc72b6d7d8
@ -187,7 +187,7 @@ main (int argc, char *argv[])
|
||||
|
||||
if (res != __GCONV_OK)
|
||||
{
|
||||
if (errno == EINVAL)
|
||||
if (res == __GCONV_NOCONV || res == __GCONV_NODB)
|
||||
{
|
||||
/* Try to be nice with the user and tell her which of the
|
||||
two encoding names is wrong. This is possible because
|
||||
|
Loading…
Reference in New Issue
Block a user