curl / Mailing Lists / curl-library / Single Mail

curl-library

encoding expectations

From: Michael Kilburn <crusader.mike_at_gmail.com>
Date: Wed, 18 Apr 2018 21:56:08 -0500

Hi,

Apparently certain easy options expect data to be encoded in certain way.
For example, it seems that CURLOPT_URL expects a string that is encoded
according to current C locale(?). And if user encoding doesn't support
certain symbol -- curl can't talk to a server who's name contains that
symbol.

It is no problem on Linux where "user encoding" apparently is UTF-8, but on
Windows it is a problem.

Questions:
- what encoding libcurl assumes for data passed in CURLOPT_URL/etc? (on
Windows/Linux/etc)
- what other easy options make use of "user encoding"? CURLOPT_HTTPHEADER?
Anything else? Online doco doesn't seem to mention this explicitly anywhere.
- is there a way to pass utf-8 encoded url to curl without converting it to
some encoding? Smth like CURLOPT_URL_UTF8

I am specifically interested in information about rmt_lib_curl v7.51.0 (
https://www.nuget.org/packages/rmt_curl_winssl/) -- problem showed up in
windows build of my code that uses this nuget. Googling all this produces
stuff like this:
https://github.com/curl/curl/pull/654#issuecomment-198633366
which doesn't look very good.

-- 
Sincerely yours,
Michael.

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-04-19