Page MenuHome GnuPG

gpg.exe interrupt batch execution in WindowsXp
Closed, WontfixPublic

Description

Starting from gnupg-w32-2.2.28, run gpg will change the command line window property: font and its size is changed, column numbers seems changed too, and scrambled characters appear. It is like the code page or locale is set to another language. My system is zh-cn, in WindowsXpSP3.

And I have a batch in %SendTo% directory:

"C:\Program Files\GnuPG\bin\gpg.exe" --verify %1
pause

Normally it will pause after execution letting me check the verification result, but new version will flash away not regarding the "pause" line.

Details

Version
2.2.27 above

Event Timeline

werner added projects: gnupg (gpg22), Windows.
werner added a subscriber: werner.

Frankly, I don fully understand your report. Can you please clarify?
Note that with 2.2.8 we introduced full Unicode support on the command line. If you see scrambled output you may want to "chcp 65001" to get the output correctly rendered.

So it is related to code page. Screenshots may be more informative:

Version 2.2.27 command window and its properties:


Install Version 2.2.28, command window and its properties:


Same version command issued after installation of new version. The previous output of 2.2.27 is scrambled, besides the command itself.


Seen from the windows properties, the code page changes from 936 to blank, and font size changed from 8*16 to 8*12

And this is the normal operation of using the bat:

After installation of new version, there's just a batch window flashing away.

P.S. The code page and visual effects are trivial; what really poses a problem is the batch execution. How could I still use context menu to verify a signature? I do hope GnuPG installation would add that context menu for me, if the batch execution is not supported anymore.

Sorry, GnuPG proper has no context menu or any graphic user interface. You need to install Gpg4win for this. Regarding use of gpg by other programs: There has been no change - other programs need to use the status-fd/command-fd interface and that has always been defined as UTF-8 and not as any native codepage. Please ask the makers of The Bat what is going wrong there.

Thanks to jaclaz@msfn.org, the workaround is to use pipe operation like:
pause|"C:\Program Files\GnuPG\bin\gpg.exe" --verify "%1"
He also confirmed that gpg.exe does interrupt batch processing, regardless what command is followed.
And I have tested in Windows 7, batch processing is not interrupted. Since this bug is WindowsXp specific, "won't fix" should be more proper.

luweitest renamed this task from gpg.exe changes the properties of command line window and do not quit normally in batch execution to gpg.exe interrupt batch execution in WindowsXp.Sep 17 2021, 5:33 AM
luweitest changed the task status from Invalid to Wontfix.
luweitest changed Version from 2.2.27 above, 2.3.1 to 2.2.27 above.

Remember to always pass --batch for unattended operations.

Tried and no change -- cmd window still flashes away.