From f2c531265b65e9b99b9634ede46829b9c771a3d6 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Tue, 13 Feb 2018 16:58:12 +0100 Subject: [PATCH] libidns2 doesn't detect locale that well... --- src/convert.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/convert.c b/src/convert.c index 82adf241..53d98e99 100644 --- a/src/convert.c +++ b/src/convert.c @@ -118,13 +118,12 @@ char * getdns_convert_ulabel_to_alabel(const char *ulabel) { #if defined(HAVE_LIBIDN2) - char *alabel; + uint8_t *alabel; if (!ulabel) return NULL; - if (idn2_lookup_ul(ulabel, &alabel, IDN2_NONTRANSITIONAL) == IDN2_OK - || idn2_lookup_ul(ulabel, &alabel, IDN2_TRANSITIONAL) == IDN2_OK) - return alabel; + if (idn2_lookup_u8((uint8_t *)ulabel, &alabel, IDN2_TRANSITIONAL) == IDN2_OK) + return (char *)alabel; #elif defined(HAVE_LIBIDN) char *alabel;