You're telling gpg
to read the passphrase from stdin using --passphrase-fd 0
. Because of this, GnuPG will use everything up to the first newline as password.
This works anyway, as encryption does not require any passphrase. Try this (example is for unix systems, not Windows, but probably wouldn't look much different over there) to demonstrate the problem:
$ cat <<EOT | gpg -e --passphrase-fd 0 --recipient email@jenserat.de | gpg -d
> foo
> bar
> EOT
Reading passphrase from file descriptor 0
You need a passphrase to unlock the secret key for
user: "Jens Erat <email@jenserat.de>"
2048-bit RSA key, ID 3A5E68F7, created 2010-12-12 (main key ID D745722B)
gpg: encrypted with 2048-bit RSA key, ID 3A5E68F7, created 2010-12-12
"Jens Erat <email@jenserat.de>"
bar
Solution: Remove --passphrase-fd 0
from the parameters.