On Tuesday, 26 May 2015 11:38:09 -0300, Bruno Jesus wrote:
On Tue, May 26, 2015 at 5:56 AM, Hugh McMaster wrote:
Your patch had the unfortunate side-effect of breaking output for almost all resource strings used in regsvr32. The problem is that the names of DLLs and input commands are still in ASCII.
I have no idea what you are talking about, I thought it would be an easy bug to fix in my coffee time, but obviously it's something much more complex than I could expect.
Sorry, I didn't explain this very well.
regsvr32 uses "int main(int argc, char* argv[])". As you know, this only takes ascii characters. So, calling "./wine regsvr32 abc.dll" makes all input args ascii.
When regsvr32 outputs a resource string using WriteConsoleW, it tries to print everything as Unicode.
STRING_REGISTER_SUCCESSFUL, "regsvr32: Successfully registered DLL '%1'\n"
This will be Unicode, but the replacement for %1 (abc.dll) is still ascii, which prints as garbage with WriteConsoleW.
Unfortunately, WriteConsoleW doesn't convert ascii characters to Unicode without specifying the token as %1!S! in the resource string. So we'd have to do this to every resource string.
Fixing the issue requires more work, as regsvr32 needs to be converted to Unicode first.
I wrote patches to do that last year, but Alexandre felt they weren't needed. He said something like, "If it isn't broken, don't fix it". But now there is a problem, as translations are broken.
I've rebased the patches against the latest commit base and uploaded them to my Dropbox account. [1]
Feel free to use them. Or, if you like, I'll resend them to wine-patches.
We do have a real bug now, so I think the sane thing to do is for you to resend your patches.
Making the whole program Unicode is probably a better solution, so I'll review the patches and resend.