curl / Mailing Lists / curl-library / Single Mail


Re: encoding expectations

From: Michael Kilburn <>
Date: Sat, 28 Apr 2018 16:54:23 -0500

 On Wed, 26 Apr 2018, Daniel Stenberg wrote:

>> In any case, it would be really helpful to mention all this on
>> help page.
> Feel free and welcome to suggest improvements to the documentation. Even
a PR
> if you're up for it! What exactly do you think it should say that would've

> helped you?

Basically, smth along these lines (assuming it is correct on every system
curl is being used):
- CURLOPT_URL string is expected to in US-ASCII-compatible encoding where
certain symbols (slash, dot, @, etc) can't appear as part of another
(multibyte) character
- if libcurl is built with IDN support -- server name is always assumed to
be in current encoding (according to locale) or UTF8 (on Windows) and will
get converted to punycode before being used in DNS request
- if libcurl is built without IDN support -- server name is directly sent
to DNS server (without converting to punycode)

tbh, I'd simply make it always UTF-8 regardless of locale or OS. But, I
understand it may cause issues...

> To accommodate internationalized domain names in the current structure,
> conforming implementations MUST convert internationalized domain names to
> the ASCII Compatible Encoding (ACE) format as specified in Section 4 of
> 3490 before storage in the dNSName field.

Perfect. I hoped this is the case, just didn't know for sure.

Thank you, Daniel.

Received on 2018-04-28