cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: encoding of file:// URL on Windows

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 8 Aug 2014 19:39:06 +0200

On Fri, Aug 08, 2014 at 07:00:48PM +0200, Pierre Joye wrote:
> On Aug 7, 2014 4:17 PM, <clinton_at_elemtech.com> wrote:
> > What encoding does libcurl expect from the caller when setting the
> CURLOPT_URL option?  UTF-8 or the Windows ANSI code page?
> > The answer to that would help make a correct patch.
>
> As far as I remember no specific encoding are expected as *nix just take
> everything they get.
>
> I would suggest to implement it to expect UTF-8 on Windows and use the *W APIs,
> converting UTF-8 to wchar before.

Wouldn't it make more sense to expect the encoding of the current code page? If
someone cuts and pastes an i18n URL into the command-line for example, treating
that unconditionally as UTF-8 would be wrong, IIUC.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-08