Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Corrupt patches for modules named in certain languages #2131
Debugger Version: 3 Mar 2019
When exporting patches for modules with names in certain encodings it seems the patch length gets thrown off and some bytes aren't written. This seems to happen even when using the translations for those languages. This can be reproduced by naming a module テスト or another word in an afflicted language and trying to export a patch for it.
Looking at the patch code I think the issue is how the length of the patch for each module is decided. The patch text gets converted to UTF-8 but the length used when writing to the file is the one from before the conversion. Changing the code to use the length of the text from after the conversion to UTF-8 seems to alleviate the issue.
This is what things look like after the change. The patch for テスト is now written normally. I've submitted a pull request with the changes I made to get that result.