[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Patch: Make url_file_name also convert remote path to loc

From: Yuxi Hao
Subject: Re: [Bug-wget] Patch: Make url_file_name also convert remote path to local encoded
Date: Mon, 13 Nov 2017 19:41:32 +0800

Hi Tim,

> From: Tim Rühsen [mailto:address@hidden
> Sent: 2017年11月12日 21:51
> Hmmm, is this a stand-alone patch and working without your patch #1 (Fix
> printing...) ?

Yes. They are standalone patches.

> Please give at least one example (better more) to show what your patch
> Even better: write a small python test in testenv which fails without your
> and succeeds with your patch. That would protect against regressions.

url.c, 1703:
  /* Start with the directory prefix, if specified. */
  if (opt.dir_prefix)
    append_string (opt.dir_prefix, &fnres);

All following pathes and file name from the server that is going to be
appened to fnres,
Should be converted to local encoded. Obviously, someone just forgot it!
So, example, we just need a URL with non-ASC characters in the directory
part of the path.
The easiest way could be we can find out a server which allow directory
listing, then call
Wget -x ...
Finally, I got one:
The attached screenshot is right with the patch. My codepage is 936 that is
compatible with Chinese.

Finally, I think in this case, a test script costs much more than the fix
itself :(
I am try on it. I will send it to you if I got it work.

> As I understand, the second patch is still in discussion with Eli. Since I
do not
> have Windows, I can't help you here. Though what I saw from the
> you address a portability issue that likely should be solved within
gnulib. Maybe
> you could (in parallel) send a mail to address@hidden with a link to
> discussion with Eli. There might be some people with deeper knowledge.
> With Best Regards, Tim

Attachment: Non-ASC-Char-in-Dir.png
Description: PNG image

reply via email to

[Prev in Thread] Current Thread [Next in Thread]