curl-library
Re: encoding of file:// URL on Windows
Date: Fri, 8 Aug 2014 19:00:48 +0200
Hi,
On Aug 7, 2014 4:17 PM, <clinton_at_elemtech.com> wrote:
>
> Hi,
>
> I'm having problems using non-ascii characters with libcurl. I am
getting errors that files cannot be found.
>
> From lib/file.c, it appears to be using the ANSI API open() for file
URLs, which does not work with all possible file names.
> This was reported a few years back:
http://curl.haxx.se/mail/lib-2010-05/0121.html
> But it doesn't appear to be fixed.
>
> 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.
Cheers,
Pierre
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-08