Encoding Question

Hi n8n community…

I’m struggling with the following:

I receive a string via Webhook, it’s UTF-8 encoded. And the string conatins french characters: e.g. “é”, etc.

The FTP folder is then synchronised with a Windows Folder, where an incoming File triggers a command in a Software…
This Software needs to have the String in “Windows-1252” encryption.

I already tried the “Move to Binary” node, but without success…
I don’t know, how to send the file to this windows folder in the correct Encoding…

Is there a way to do it in n8n?
Thx for helping me out.

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

@zuselli , will replacing the “offending” characters with the standard ASCII characters work for you?
If, so, you can use replaceSpecialChars() function on the file name.

{{ "é".replaceSpecialChars() }} == "e"

Unfortunately not due to the receiver software needs exactly the string in windows1252 encoding…
I tried with move to binary node with windows-1252 encoding, but without success…

in java it works with this:

            BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(pathToCommandFile + "cmd.txt"), "Cp1252"));

Ok, I think I’m coming closer…
It seems that I need to write binary file…
But in my case, I want to write binary file with only one string inside the file…

The output of move json to binary is always empty…