VisualWGet 2.4 + quick patch for non-Latin characters

476 views
Skip to first unread message

dvv...@gmail.com

unread,
Feb 14, 2014, 10:07:48 AM2/14/14
to visualwge...@googlegroups.com
WGet is known to save files with non-Latin names (such as Cyrillic) by representing such file names incorrectly.
I've created a quick fix for that, basing on the sources of vwget-2.4-src.zip from https://sites.google.com/site/visualwget/a-download-manager-gui-based-on-wget-for-windows
This is just a quick fix that renames a file to a proper name at the end of the download.
To make this renaming possible, you should specify the WGet's option "--restrict-file-names=nocontrol".
There is one undesired issue, however, that I could not solve in the scope of this fix. Here is the issue: if you restart a download that results a non-Latin file name, it will always be re-downloaded from scratch, because the saved non-Latin file name does not match the file name reported by WGet (where WGet actually represents the non-Latin file name by sequence of UTF-8 bytes).

Vitalii Dovgan

unread,
Feb 15, 2014, 11:28:02 AM2/15/14
to visualwge...@googlegroups.com
Please find attached (both the .exe and two updated source files).
VisualWget-2.4-updated.zip

Vitalii Dovgan

unread,
Feb 17, 2014, 1:34:31 PM2/17/14
to visualwge...@googlegroups.com
To make this renaming possible, you should specify the WGet's option "--restrict-file-names=nocontrol": VisualWget-DefaultDownloadOptions.png

Vitalii Dovgan

unread,
Feb 17, 2014, 3:59:59 PM2/17/14
to visualwge...@googlegroups.com
Please find the second version of the patch attached. It includes both the updated executable and the updated source files.
The goal of this second update is the following: if the saved file name is not a valid sequence of UTF-8 bytes (this happens if the download was run without specifying "--restrict-file-names=nocontrol"), this file is not renamed because it's not possible to restore the correct non-Latin file name in this case. And when the file name is a valid sequence of UTF-8 bytes (when "--restrict-file-names=nocontrol" was specified), it is renamed to restore the original non-Latin file name.
Also this archive includes updated Russian translation with a few corrections.
VisualWget-2.4-updated_2.zip
Reply all
Reply to author
Forward
0 new messages