Skip to content

Commit f2c5312

Browse files
committed
libidns2 doesn't detect locale that well...
1 parent 9999907 commit f2c5312

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/convert.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,12 @@ char *
118118
getdns_convert_ulabel_to_alabel(const char *ulabel)
119119
{
120120
#if defined(HAVE_LIBIDN2)
121-
char *alabel;
121+
uint8_t *alabel;
122122

123123
if (!ulabel) return NULL;
124124

125-
if (idn2_lookup_ul(ulabel, &alabel, IDN2_NONTRANSITIONAL) == IDN2_OK
126-
|| idn2_lookup_ul(ulabel, &alabel, IDN2_TRANSITIONAL) == IDN2_OK)
127-
return alabel;
125+
if (idn2_lookup_u8((uint8_t *)ulabel, &alabel, IDN2_TRANSITIONAL) == IDN2_OK)
126+
return (char *)alabel;
128127

129128
#elif defined(HAVE_LIBIDN)
130129
char *alabel;

0 commit comments

Comments
 (0)