From gpg4win-users-en Wed Apr 03 08:05:25 2024 From: Ingo =?ISO-8859-1?Q?Kl=F6cker?= Date: Wed, 03 Apr 2024 08:05:25 +0000 To: gpg4win-users-en Subject: Re: [Gpg4win-users-en] --export incompatible with --import Message-Id: <4560694.LvFx2qVVIh () daneel> X-MARC-Message: https://marc.info/?l=gpg4win-users-en&m=171213137419770 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============5668017330720360456==" --===============5668017330720360456== Content-Type: multipart/signed; boundary="nextPart2323975.ElGaqSPkdT"; micalg="pgp-sha512"; protocol="application/pgp-signature" --nextPart2323975.ElGaqSPkdT Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Ingo =?ISO-8859-1?Q?Kl=F6cker?= To: gpg4win-users-en@wald.intevation.org Subject: Re: [Gpg4win-users-en] --export incompatible with --import Date: Wed, 03 Apr 2024 10:05:25 +0200 Message-ID: <4560694.LvFx2qVVIh@daneel> In-Reply-To: <4cea3f6a-2d2a-4fa8-92bc-14fb91d99818@drschrisjacobs.nl> References: <4cea3f6a-2d2a-4fa8-92bc-14fb91d99818@drschrisjacobs.nl> MIME-Version: 1.0 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 --nextPart2323975.ElGaqSPkdT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTbjgIOMowwlCBgvyGxb1mVFkdKugUCZg0NxQAKCRCxb1mVFkdK utG0AQDo/KZ1CkhWhRBmxGuX5hxfRivnju5kEZV1XHRmqARltQD9G4Ohdy0+Qoe+ gZKaW/gDdPNOK75GdzZIGURgCZwhAQo= =XgEO -----END PGP SIGNATURE----- --nextPart2323975.ElGaqSPkdT-- --===============5668017330720360456== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KR3BnNHdpbi11 c2Vycy1lbiBtYWlsaW5nIGxpc3QKR3BnNHdpbi11c2Vycy1lbkB3YWxkLmludGV2YXRpb24ub3Jn Cmh0dHBzOi8vbGlzdHMud2FsZC5pbnRldmF0aW9uLm9yZy9jZ2ktYmluL21haWxtYW4vbGlzdGlu Zm8vZ3BnNHdpbi11c2Vycy1lbg== --===============5668017330720360456==--