Skip to content

Commit

Permalink
libidns2 doesn't detect locale that well...
Browse files Browse the repository at this point in the history
  • Loading branch information
wtoorop committed Feb 13, 2018
1 parent 9999907 commit f2c5312
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f2c5312

Please sign in to comment.