#elif defined(USE_WIN32_IDN)
/* prototype for curl_win32_idn_to_ascii() */
bool curl_win32_idn_to_ascii(const char *in, char **out);
+#elif defined(USE_GLIB2_HOSTNAME)
+#include <glib.h>
#endif /* USE_LIBIDN2 */
#include "urldata.h"
}
else
infof(data, "Failed to convert %s to ACE;\n", host->name);
+#elif defined(USE_GLIB2_HOSTNAME)
+ gchar *ace_hostname = NULL;
+ ace_hostname = g_hostname_to_ascii(host->name);
+ if(ace_hostname) {
+ host->encalloc = (char *)ace_hostname;
+ host->name = host->encalloc;
+ }
+ else
+ infof(data, "Failed to convert %s to ACE;\n", host->name);
#else
infof(data, "IDN support not present, can't parse Unicode domains\n");
#endif