# Decode CSV from HTTP node (ANSI encoding)

**URL:** <https://community.n8n.io/t/decode-csv-from-http-node-ansi-encoding/13840>\
**Category:** Questions\
**Tags:** data-transformation, node, move-binary-data\
**Created:** [May 10, 2022, 8:53am UTC](https://community.n8n.io/t/decode-csv-from-http-node-ansi-encoding/13840 "2022-05-10T08:53:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gregory\_CHAURAND](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/gregory_chaurand/32/7749_2.png) [@Gregory\_CHAURAND](https://community.n8n.io/u/Gregory_CHAURAND)\
**Post date:** [May 10, 2022, 8:53am UTC](https://community.n8n.io/t/decode-csv-from-http-node-ansi-encoding/13840/1 "2022-05-10T08:53:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [May 11, 2022, 1:51pm UTC](https://community.n8n.io/t/decode-csv-from-http-node-ansi-encoding/13840/2 "2022-05-11T13:51:46Z")

</div>

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

 ![image](https://europe1.discourse-cdn.com/n8n/original/2X/4/4010739b446f3f715af58f64a865c6f5ce71717a.png)

The term ANSI is a bit ambiguous, at least according to [Wikipedia](https://en.wikipedia.org/wiki/Windows-1252).

---

<div class="post-metadata">

**Author:** ![Mikhail](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mikhail/32/14880_2.png) [@Mikhail](https://community.n8n.io/u/Mikhail)\
**Post date:** [August 1, 2022, 12:51pm UTC](https://community.n8n.io/t/decode-csv-from-http-node-ansi-encoding/13840/3 "2022-08-01T12:51:08Z")

</div>

Hi @MutedJam !

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

 ![6592chrome](https://europe1.discourse-cdn.com/n8n/original/2X/b/bd8b485fcffa45de4e54694410b18ead17c68bb5.jpeg)

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

 ![6589chrome](https://europe1.discourse-cdn.com/n8n/original/2X/a/a1c8f8452637140a2d428587e26bc14874846f10.jpeg)

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

---

<div class="post-metadata">

**Author:** ![Mikhail](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mikhail/32/14880_2.png) [@Mikhail](https://community.n8n.io/u/Mikhail)\
**Post date:** [August 1, 2022, 1:04pm UTC](https://community.n8n.io/t/decode-csv-from-http-node-ansi-encoding/13840/4 "2022-08-01T13:04:48Z")

</div>

I do not know why, I have an error, although the file is easy to download.  
[https://zasdfg.com/catalog\_dron.csv](https://zasdfg.com/catalog_dron.csv)

 ![6593chrome](https://europe1.discourse-cdn.com/n8n/original/2X/a/af6eb4dcc18a74a7620533b0ea883bc19adbcda7.jpeg)

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [August 1, 2022, 1:19pm UTC](https://community.n8n.io/t/decode-csv-from-http-node-ansi-encoding/13840/5 "2022-08-01T13:19:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mikhail](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mikhail/32/14880_2.png) [@Mikhail](https://community.n8n.io/u/Mikhail)\
**Post date:** [August 1, 2022, 1:23pm UTC](https://community.n8n.io/t/decode-csv-from-http-node-ansi-encoding/13840/6 "2022-08-01T13:23:38Z")

</div>

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

> [@Jon](#):
>
> I am seeing an encoding issue of somekind but I get that when downloading the file directly and reading it on my machine

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.

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [August 1, 2022, 1:34pm UTC](https://community.n8n.io/t/decode-csv-from-http-node-ansi-encoding/13840/7 "2022-08-01T13:34:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mikhail](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mikhail/32/14880_2.png) [@Mikhail](https://community.n8n.io/u/Mikhail)\
**Post date:** [August 1, 2022, 3:52pm UTC](https://community.n8n.io/t/decode-csv-from-http-node-ansi-encoding/13840/8 "2022-08-01T15:52:37Z")

</div>

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

 ![6621chrome](https://europe1.discourse-cdn.com/n8n/original/2X/d/d64e0e0fa9f785418983fdb578d76e27486e86df.jpeg)

 ![6618chrome](https://europe1.discourse-cdn.com/n8n/original/2X/4/40e19e06891c7b353dbbf5364dffe765463839de.jpeg)

 ![6622chrome](https://europe1.discourse-cdn.com/n8n/original/2X/5/5465bfe13af3d6a6cf0f97f9faaeca4752c28363.jpeg)

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [August 1, 2022, 4:08pm UTC](https://community.n8n.io/t/decode-csv-from-http-node-ansi-encoding/13840/9 "2022-08-01T16:08:28Z")

</div>

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.

```auto
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.

```

---

<div class="post-metadata">

**Author:** ![Mikhail](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mikhail/32/14880_2.png) [@Mikhail](https://community.n8n.io/u/Mikhail)\
**Post date:** [August 2, 2022, 8:26am UTC](https://community.n8n.io/t/decode-csv-from-http-node-ansi-encoding/13840/10 "2022-08-02T08:26:16Z")

</div>

Hey @Jon  
I created a [new topic to describe the whole task](http://community.n8n.io/t/how-to-transfer-information-from-excel-file-by-link-to-g-sheet-with-correct-encoding-and-filtering/16261), maybe you will have time to respond. Thank you very much!
