# \[FYI\]Using encoding binary didn't give expected result with file write node

**URL:** <https://discourse.nodered.org/t/fyi-using-encoding-binary-didnt-give-expected-result-with-file-write-node/87012>\
**Category:** General\
**Created:** [4 April 2024 16:28 UTC](https://discourse.nodered.org/t/fyi-using-encoding-binary-didnt-give-expected-result-with-file-write-node/87012 "2024-04-04T16:28:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [4 April 2024 16:28 UTC](https://discourse.nodered.org/t/fyi-using-encoding-binary-didnt-give-expected-result-with-file-write-node/87012/1 "2024-04-04T16:28:10Z")

</div>

I was using the file write node to save a file (Linux system) and because I was feeding it with a buffer payload, I thought that choosing binary as the encoding was the right thing to do.

But it wasn't - the saved file wasn't quite right

I switched to default and everything is fine  
No-idea what is going on down in the engine room but thought I'd share to save someone else a few hours 🙂

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/6/d6ba9c4e3fac47fb5635c2f5043fa61c1071de9e.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 April 2024 19:52 UTC](https://discourse.nodered.org/t/fyi-using-encoding-binary-didnt-give-expected-result-with-file-write-node/87012/2 "2024-04-04T19:52:12Z")

</div>

I think you would need to provide us with some test input data so we can see the situation.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [4 April 2024 19:54 UTC](https://discourse.nodered.org/t/fyi-using-encoding-binary-didnt-give-expected-result-with-file-write-node/87012/3 "2024-04-04T19:54:12Z")

</div>

It's an FYI not a cry for help 🙂

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 April 2024 19:58 UTC](https://discourse.nodered.org/t/fyi-using-encoding-binary-didnt-give-expected-result-with-file-write-node/87012/4 "2024-04-04T19:58:34Z")

</div>

Let me rephrase that, I would like to understand why that is necessary. Do you have a short example that fails? If so you should be able to copy the value from the debug panel and paste it here so we can try it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 July 2024 19:59 UTC](https://discourse.nodered.org/t/fyi-using-encoding-binary-didnt-give-expected-result-with-file-write-node/87012/5 "2024-07-03T19:59:17Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
