[Gpg4win-users-en] --export incompatible with --import
Ingo Klöcker
kloecker at kde.org
Wed Apr 3 10:05:25 CEST 2024
On Dienstag, 2. April 2024 12:49:57 CEST Chris Jacobs wrote:
> Using Gpg4win-4.3.1 on command line Windows 11
>
> PS C:\Users\chris> gpg -a --export test > test
[...]
> PS C:\Users\chris> gpg --import test
> gpg: [don't know]: partial length invalid for packet type 63
> gpg: read_block: read error: Ongeldig pakket
> gpg: import from 'test' failed: Ongeldige sleutelring
> gpg: Total number processed: 0
> PS C:\Users\chris>
>
> Looking for the cause I found that gpg --export creates an utf-16 LE
> file and gpg --import expects ascii or utf-8 without bom but not utf-16 LE
I suspect that this is a "feature" of the output redirection in PowerShell.
Use the --output option with --export to avoid problems caused by output
redirection.
For Kleopatra we have recently added support for different UTF encodings when
importing certificates.
Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.wald.intevation.org/pipermail/gpg4win-users-en/attachments/20240403/ea949874/attachment.sig>
More information about the Gpg4win-users-en
mailing list