Repository navigation
Conversation
* src/wget2.manifest: New application manifest with activeCodePage UTF-8. * src/wget2.rc: New file, links the manifest as resource. * src/Makefile.am: Link wget2.rc into the executables if windres is found. * configure.ac: Check for windres on MinGW, define WINDOWS_UTF8_MANIFEST. * tests/test-idn-cmd.c, tests/test-idn-robots.c: Skip on Windows with the manifest, the EUC-JP command line can't get through. wget2 passes UTF-8 file names to the ANSI file functions, so names with characters outside the Windows code page (e.g. Cyrillic or Japanese with code page 1252) were saved as mojibake with --restrict-file-names=nocontrol. Windows 10 1903 and later honor the manifest, older versions ignore it. Copyright-paperwork-exempt: Yes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows, file names with characters outside the system code page are saved as mojibake: with code page 1252 and
--restrict-file-names=nocontrol,пример.txtbecomesпример.txt, and Japanese names fare the same ("Failed to transcode 'utf-8' string into 'CP1252'"). This is the rest of #388 after #399 and #400.activeCodePage, Windows 10 1903 and later; older versions ignore it).configurelooks forwindreson MinGW and linkssrc/wget2.rcintowget2.exeandwget2_noinstall.exe.café.txt,пример.txtand日本語.txtare saved correctly withnocontrolandwindows,nocontrol. With the defaultwindowsrestriction, escaped names change from the local code page to UTF-8 (caf%E9.txtbecomescaf%C3%A9.txt).--local-encodingother than UTF-8 no longer applies to command-line IRIs.test-idn-cmdandtest-idn-robotspass EUC-JP on the command line and are skipped on Windows with the manifest, liketest-iri.Tested on Windows 11 (static build, code page 1252), under wine in the buildenv-wget2-mingw image (no new failures), and
make checkon Debian (unchanged, 112/112).