www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21064] New: setCookieJar/caInfo in std.net.curl cannot handle


          Issue ID: 21064
           Summary: setCookieJar/caInfo in std.net.curl cannot handle the
                    non-ASCII paths
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: zan77137 nifty.com

Some of the functions provided by std.net.curl handle paths, such as
setCookieJar and caInfo. But they cannot handle the non-ASCII paths.

import std;

void makeCookieFile(string dir)
    if (!dir.exists)
    auto client = HTTP();
    get("https://dlang.org", client);

void main()
    auto asciiPath = "abcde";
    auto nonAsciiPath = "あいうえお";
    // Assertion failure, the nonAsciiPath is not including anything
    assert(dirEntries(asciiPath,    SpanMode.shallow).map!"a.name".equal(
           dirEntries(nonAsciiPath, SpanMode.shallow).map!"a.name"));
core.exception.AssertError src\main.d(19): Assertion failure

I did a little research, but I couldn't figure out what character code should
be passed to Curl... Probably that is the system-dependent MBCS(NOT UTF-8).

Jul 21 2020