curl-library
Re: encoding expectations
Date: Tue, 24 Apr 2018 15:39:21 +0200 (CEST)
On Mon, 23 Apr 2018, Michael Kilburn wrote:
> So, hostname (once extracted from url) is treated as opaque bytes unless
> curl is built with IDN support -- in which case it'll assume it is in
> "current" encoding and try to convert it into punycode before sending to DNS
> server. Am I correct?
I would have said unconditionally yes, but then your comment about winidn made
me look that up and yes that seems to require that the host name is provided
as UTF-8 for it to work! I find that a little odd, but I can live with it.
> I'll have to link libcurl statically to avoid problems if client's libcurl
> is built in wrong way.
There are litterally *millions* of combinations to build libcurl, and we offer
both build-time and run-time ways for you to check what a particular
build/library supports. But yes, if you want to be truly sure that there's a
specific build combination for you to use, you better build your own.
> How does it work for EBCDIC without converting it to ASCII? these parts of
> url should end up on HTTP header somewhere and HTTP standard requires
> header to be US-ASCII encoded (afaik).
EBCDIC systems do a whole lot of converting back and forth to/from ascii for
the various protocols.
-- / daniel.haxx.se ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2018-04-24