January 15, 2026 at 8:50 pm
Hello SSC,
Has anyone encountered this before???
I have an odd issue that I need to debug. I am encrypting a text file to PGP. I am able to do this locally without any issues, but when I try to transfer the file to the SFTP site, it fails. I Googled this issue and actually watched a bunch of videos on file encryption, and it looks like I am doing this correctly. Code sample and the response from the recipient is below.
Any assistance would be greatly appreciated!
Execute Process Task:
Executable: C:\blah\blah\bin\gpg.exe
Arguments: --output Somefile.txt.gpg --encrypt --recipient Somewhere@Someplace.com Somefile.txt
"Non-UTF8 characters aren’t accepted and can cause issues during the file load process. I noticed your file contains non-UTF8 characters in multiple rows. When opened in Notepad++, these lines typically look like the example below. Error loading client records. File received contained over 90 percent invalid records."

The are no problems, only solutions. --John Lennon
January 16, 2026 at 9:14 am
What does gpg.exe do?
January 16, 2026 at 6:29 pm
Hi Phil,
Happy new year!
That is the executable for the software that encrypts the file. I think...
The are no problems, only solutions. --John Lennon
January 16, 2026 at 7:08 pm
So ... you're using PGP and the executable is called GPG ... weird, but OK!
If that is just the encryption process, what is doing the SFTP part which is when the error occurs?
Or are you saying that just the encryption part is failing (meaning that the SFTP bit is not really relevant)?
January 16, 2026 at 7:21 pm
GnuPG = gpg.exe
January 16, 2026 at 7:22 pm
The error message is coming from the company which we are sending the encrypted file to. Just to be clear, this file is being rejected from the client's side. On our side, we are getting success. Here is the reply from the client and error message.
"Non-UTF8 characters aren’t accepted and can cause issues during the file load process. I noticed your file contains non-UTF8 characters in multiple rows."
Thanks
The are no problems, only solutions. --John Lennon
January 16, 2026 at 7:41 pm
You can try running this PS Script on the text file before encrypting it.
(Get-Content "C:\path\file.txt") |
Set-Content -Encoding UTF8 "C:\path\file_utf8.txt"
January 16, 2026 at 7:47 pm
FYI: in your Argument your sending the unencrypted file. Shouldn't you be sending the Somefile.txt.gpg file instead?
Execute Process Task:
Executable: C:\blah\blah\bin\gpg.exe
Arguments: --output Somefile.txt.gpg --encrypt --recipient Somewhere@Someplace.com Somefile.txt
January 16, 2026 at 7:55 pm
Isn't this the output?
--output Somefile.txt.gpg
The are no problems, only solutions. --John Lennon
January 16, 2026 at 7:58 pm
Yes but in your Argument your sending the unencrypted file. Somefile.txt
January 16, 2026 at 7:58 pm
The file is being rejected due to Non-UTF8 characters by the client. I am able to encrypt it locally. If the output was a text file, I would think the file would have no issues? I could be wrong, I do not have a lot of experience with file encryption.
The are no problems, only solutions. --John Lennon
January 16, 2026 at 8:07 pm
Which File are you sending? Somefile.txt.gpg or Somefile.txt, you should be sending the Somefile.txt.gpg
January 16, 2026 at 8:13 pm
So, you are saying that the txt and txt.gpg should be reversed? I am not saying that you are wrong, but I Googled this and watched a few videos on encryption, and this was the order.
The are no problems, only solutions. --John Lennon
January 16, 2026 at 8:15 pm
You should be sending the file ending in .gpg
Viewing 15 posts - 1 through 15 (of 21 total)
You must be logged in to reply to this topic. Login to reply