[Gpg4win-users-en] --export incompatible with --import
Chris Jacobs
ctjacobs at drschrisjacobs.nl
Wed Apr 3 16:21:45 CEST 2024
You are right. If I use the other terminal prompt (Opdrachtprompt in
Windows Tools) the problem does not occur.
Op 3-4-2024 om 10:05 schreef Ingo Klöcker:
> 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
>
> _______________________________________________
> Gpg4win-users-en mailing list
> Gpg4win-users-en at wald.intevation.org
> https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/gpg4win-users-en
More information about the Gpg4win-users-en
mailing list