diff options
author | Alessandro Ghedini <alessandro@ghedini.me> | 2017-01-14 16:16:56 +0000 |
---|---|---|
committer | Alessandro Ghedini <alessandro@ghedini.me> | 2017-01-14 16:21:48 +0000 |
commit | b135cd255b6aa7d051ea906693bf67580153ed76 (patch) | |
tree | 38f2a6b54827b177872a313bf6b68ef5a188b4f3 | |
parent | 02ee3b2737474ac34cea17f4a7505c2a6dfb4c56 (diff) | |
download | curl-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 */ |