Decode CSV from HTTP node (ANSI encoding)

Hi,
I’m trying to decode a CSV file received from an HTTP node, the problem is that the file is ANSI encoded and I can’t find a way to decode it properly. I used Move Binary Data node but ANSI is not in the list
Does anyone have an idea for a solution?
Thanks,
Gregory

  • n8n version: 0.160.0
  • Running n8n via: n8n.cloud
1 Like

Hey @Gregory_CHAURAND, I think you might be looking for windows1252 option here:

image

The term ANSI is a bit ambiguous, at least according to Wikipedia.

1 Like

Hi @MutedJam !

I have the very same problem, but I can’t use “move binary data” node because of an error

Could you please tell me how to solve it ?
I can’t find “encoding” in either one or the second node:

6589chrome

The only way is to use the “move binary data” node ?
But I already have the data in json.

I do not know why, I have an error, although the file is easy to download.
https://zasdfg.com/catalog_dron.csv

Hey @Mikhail,

Read Binary File is for reading local files not files from the internet, To get that file going it should be like what you posted earlier. I am seeing an encoding issue of somekind but I get that when downloading the file directly and reading it on my machine as well so could be the document itself or I am missing a language pack or something.

1 Like

Hey @jon ! Thank you so much for your reply!

I don’t have any problems with the encoding when I read the file from my computer either.
What about the document? It is used in other services, there are no problems.

Hey @Mikhail,

When I open the file on my local machine that I download directly from that site I see the same format as the one in n8n so I assume it is the encoding. It could be that you need to save it to disk then read it with the correct encoding.

1 Like

@jon Can you clarify why it works when it’s off, but not when it’s on?

Hey @Mikhail,

When that option is set it will try to set all the json data from the binary file and some of those fields might not exist. The snippet below from the docs might help.

If set to active, all JSON data is replaced with the data retrieved from binary key. If it is not set to active, the data will be written to a single key. This field is displayed when 'Binary to JSON' is selected from the Mode dropdown list.
1 Like

Hey @jon
I created a new topic to describe the whole task, maybe you will have time to respond. Thank you very much!