curl-library
Re: encoding of file:// URL on Windows
Date: Fri, 8 Aug 2014 22:25:26 +0200
On Aug 8, 2014 7:52 PM, "Clinton Stimpson" <clinton_at_elemtech.com> wrote:
>
> On Friday, August 08, 2014 07:39:06 PM Dan Fandrich wrote:
> > 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.
> >
>
> Sure, the command line can and should use the current code page. But that
> could be converted to UTF-8 before calling the library API.
>
> Either the library API is expanded to accept wide strings, or the current
API
> takes UTF-8. Is there a preference?
Utf-8 what most binding may get already :)
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-08