cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: patch for file:// encoding on Windows

From: <clinton_at_elemtech.com>
Date: Sat, 27 Sep 2014 17:34:28 -0600 (MDT)

----- Original Message -----
> On Sat, 27 Sep 2014, clinton_at_elemtech.com wrote:
>
> > Thanks for looking at them. I've updated the patches (see attached).
>
> Can you please clarify the reason for the second patch and how it relates to
> the topic "patch for file:// encoding on Windows" ?

The first changes libcurl to work with unicode applications.
The second fixes curl to work with that change in libcurl.

>
> The comments say it converts URLs to UTF-8 on windows. From what encoding?

From the current code page, which is the 8 bit encoding for curl on Windows.

>
> It feels like something with a much larger scope than just file:// URLs that
> I
> feel very scared of even considering. Please provide a proper motivation for
> why we want this! URLs are not UTF-8, they're a sequence of bytes/octets.

The raw "sequence of bytes" idea doesn't work on Windows. Not all files are accessible this way when you have an NTFS file system that supports file names that can't be represented with the default 8 bit encoding.

This problem has been brought up before:
http://curl.haxx.se/mail/lib-2014-08/0062.html
http://curl.haxx.se/mail/lib-2010-05/0133.html
http://curl.haxx.se/mail/lib-2013-07/0268.html

Clinton
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-09-28