I have encrypted a file using GPG and a passphrase as outlined in the Additional Notes of this StackOverflow response: https://stackoverflow.com/a/31552829/8304687
However, after trying to decrypt the file I can't see the decrypted contents. I can only see a string of garbled characters.
Here are the steps I took in a bash terminal on a Mac:
gpg --output file.txt --symmetric --cipher-algo AES256 file.txt
I was then curious and did cat file.txt assuming this would not change the file.
Then to decrypt it I did:
gpg --output new_file.txt --decrypt file.txt
and got the following messages in the Terminal:
gpg: AES256.CFB encrypted data
gpg: encrypted with 1 passphrase
When I try to view my decrypted file with cat new_file.txt the output is a string of garbled characters.
What have I done wrong and how can I see the contents of my encrypted file?