In cmd.exe and PowerShell, I am able to encrypt a file into a file whose filename contains umlaut-characters:
gpg -c --batch --yes --passphrase "one two three" -o bärlauch.gpg data.txt
This produces a file named bärlauch.gpg
, as intended.
However, if I want to decrypt the content of bärlauch.gpg
to bärlauch.txt
:
gpg -d --batch --yes --passphrase "one two three" -o bärlauch.txt bärlauch.gpg
it creates a file b�rlauch.txt
.
The content of b�rlauch.txt
is correctly decrypted, however, I'd like the filename to be bärlauch.txt
.
I experience this behavior in both, cmd.exe and PowerShell.
In cmd.exe, I tried chcp 65001
, chcp 1252
and chcp 437
, yet without any noticable effect.
What setting to I have to change so that I can decrypt a file into a filename with umlaut-characters?
The "strange" character is also displayed in Explorer:
Trying --enable-special-filename
When trying the command line option --enable-special-filename
, I get the same result.
gpg -c --batch --yes --passphrase "one two three" --enable-special-filenames -o bärlauch.gpg data.txt
gpg -d --batch --yes --passphrase "one two three" --enable-special-filenames -o bärlauch.txt bärlauch.gpg
Trying --use-embedded-filename
When trying with --use-embedded-filename
, I still get the same result.
(I had to change the name of the unencrypted file from data.txt
to bärlauch.txt
, as per following sequence):
gpg -c --batch --yes --passphrase "one two three" --use-embedded-filename -o bärlauch.gpg bärlauch.txt
gpg -d --batch --yes --passphrase "one two three" --use-embedded-filename bärlauch.gpg
�
character? Is it also displayed this way in Explorer?--enable-special-filenames
nor--use-embedded-filename
made a difference.