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: Yuxi Hao
Subject: Re: [Bug-wget] Patch: Make url_file_name also convert remote path to local encoded
Date: Mon, 13 Nov 2017 20:45:47 +0800

I have dug into the test suit, and found that it do execute the command ...
So, I'm afraid that Non-ASC characters won't work correctly on all users
computer!
And we shall not able to generate a common test, which generates the same 
folder or file name with Non-ASC characters correct on all platforms. Isn't
it?

Best Regards,
YX Hao


> -----Original Message-----
> From: Yuxi Hao [mailto:address@hidden
> Sent: 2017年11月13日 19:42
> To: 'Tim Rühsen' <address@hidden>; 'address@hidden'
> <address@hidden>
> Subject: RE: [Bug-wget] Patch: Make url_file_name also convert remote path
to
> local encoded
> 
> 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
> 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%9
> 9%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%B0ho
> sts%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.
> 
> > 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 discussion, 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 your discussion with Eli.
There
> might be some people with deeper knowledge.
> >
> > With Best Regards, Tim

Attachment: Test-execution.png
Description: PNG image


reply via email to

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