bug-wget
[Top][All Lists]
Advanced

[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: Tim Rühsen
Subject: Re: [Bug-wget] Patch: Make url_file_name also convert remote path to local encoded
Date: Wed, 15 Nov 2017 20:09:52 +0100
User-agent: KMail/5.2.3 (Linux/4.13.0-1-amd64; KDE/5.37.0; x86_64; ; )

On Montag, 13. November 2017 19:41:32 CET Yuxi Hao wrote:
> 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.

Just pushed your first patch. Thanks for your work !


> > Please give at least one example (better more) to show what your patch
> 
> fixes.
> 
> > Even better: write a small python test in testenv which fails without your
> 
> patch
> 
> > 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:
> https://github.com/sy618/hosts/blob/master/%E8%B7%AF%E7%94%B1%E5%99%A8%E8%87
> %AA%E5%8A%A8%E6%9B%B4%E6%96%B0hosts/%E8%B7%AF%E7%94%B1%E5%99%A8%E8%87%AA%E5
> % 8A%A8%E6%9B%B4%E6%96%B0hosts%E6%95%99%E7%A8%8B.txt
> 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.

Don't put too much work into that at the moment. ATM, I'd appreciate it if you 
could test Wget2 with those kind of filenames. We have CI images that we can 
easily extend with codepage 936 to do automatic testing. The tests are written 
in C which makes it much easier for a C coder to add new stuff.

With Best Regards, Tim

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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