summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2017-01-14 16:16:56 +0000
committerAlessandro Ghedini <alessandro@ghedini.me>2017-01-14 16:21:48 +0000
commitb135cd255b6aa7d051ea906693bf67580153ed76 (patch)
tree38f2a6b54827b177872a313bf6b68ef5a188b4f3
parent02ee3b2737474ac34cea17f4a7505c2a6dfb4c56 (diff)
downloadcurl-idn2_utf8.tar.gz
url: assume UTF-8 when doing idn2 lookupidn2_utf8
Thanks to Tim Rühsen for the suggestion.
-rw-r--r--lib/url.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index edae1e3f3..49ed4f669 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -4026,7 +4026,8 @@ static void fix_hostname(struct connectdata *conn, struct hostname *host)
#else
int flags = IDN2_NFC_INPUT;
#endif
- int rc = idn2_lookup_ul((const char *)host->name, &ace_hostname, flags);
+ int rc = idn2_lookup_u8((const uint8_t *)host->name,
+ (uint8_t **)&ace_hostname, flags);
if(rc == IDN2_OK) {
host->encalloc = (char *)ace_hostname;
/* change the name pointer to point to the encoded hostname */