From 19b284c21452b2c50924de3e0a04f5ed8040430d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 2 Oct 2004 13:01:44 +0000 Subject: Gisle Vanem provided code that displays an error message when the (libidn based) IDN conversion fails. This is really due to a missing suitable function in the libidn API that I hope we can remove once libidn gets a function like this. --- lib/url.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index 3f40b6b61..c0921ced4 100644 --- a/lib/url.c +++ b/lib/url.c @@ -116,6 +116,7 @@ void idn_free (void *ptr); /* prototype from idn-free.h, not provided by #include "progress.h" #include "cookie.h" #include "strequal.h" +#include "strerror.h" #include "escape.h" #include "strtok.h" #include "share.h" @@ -2078,8 +2079,8 @@ static void fix_hostname(struct connectdata *conn, struct hostname *host) infof (data, "Input domain encoded as `%s'\n", stringprep_locale_charset ()); if (rc != IDNA_SUCCESS) - infof(data, "Failed to convert %s to ACE; IDNA error %d\n", - host->name, rc); + infof(data, "Failed to convert %s to ACE; %s\n", + host->name, Curl_idn_strerror(conn,rc)); else { host->encalloc = ace_hostname; /* change the name pointer to point to the encoded hostname */ -- cgit v1.2.3