mirror of https://github.com/getdnsapi/getdns.git
libidns2 doesn't detect locale that well...
This commit is contained in:
parent
9999907593
commit
f2c531265b
|
@ -118,13 +118,12 @@ char *
|
||||||
getdns_convert_ulabel_to_alabel(const char *ulabel)
|
getdns_convert_ulabel_to_alabel(const char *ulabel)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_LIBIDN2)
|
#if defined(HAVE_LIBIDN2)
|
||||||
char *alabel;
|
uint8_t *alabel;
|
||||||
|
|
||||||
if (!ulabel) return NULL;
|
if (!ulabel) return NULL;
|
||||||
|
|
||||||
if (idn2_lookup_ul(ulabel, &alabel, IDN2_NONTRANSITIONAL) == IDN2_OK
|
if (idn2_lookup_u8((uint8_t *)ulabel, &alabel, IDN2_TRANSITIONAL) == IDN2_OK)
|
||||||
|| idn2_lookup_ul(ulabel, &alabel, IDN2_TRANSITIONAL) == IDN2_OK)
|
return (char *)alabel;
|
||||||
return alabel;
|
|
||||||
|
|
||||||
#elif defined(HAVE_LIBIDN)
|
#elif defined(HAVE_LIBIDN)
|
||||||
char *alabel;
|
char *alabel;
|
||||||
|
|
Loading…
Reference in New Issue