# Dynamic file encoding

**URL:** https://discourse.nodered.org/t/dynamic-file-encoding/43434
**Category:** Feature Requests
**Created:** [31 March 2021 04:24 UTC](https://discourse.nodered.org/t/dynamic-file-encoding/43434 "2021-03-31T04:24:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rsilvestre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rsilvestre/32/39528_2.png) [@rsilvestre](https://discourse.nodered.org/u/rsilvestre)
#### Post date: [31 March 2021 04:24 UTC](https://discourse.nodered.org/t/dynamic-file-encoding/43434/1 "2021-03-31T04:24:14Z")

</div>

Hi,

I have an issue with official File node. My concern is about the Encoding option. I created a submodule that take a filename and a s3 bucket and the main idea is to send the file to Amazon. But from time to time the file is encoded in utf-8 or in cp1252. My main idea was to a change node and set msg.encoding with cp1252 or utf-8, but after an investigation in the source code, I observe than that value is "hardcoded" (not dynamic).

For the moment, i create 2 submodule (yeaaaah). One is the copy of the other (shame on me).

may be we could modify the source : [node-red/10-file.js at master · node-red/node-red · GitHub](https://github.com/node-red/node-red/blob/master/packages/node_modules/%40node-red/nodes/core/storage/10-file.js) and add that possibility?

Regards

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [31 March 2021 08:39 UTC](https://discourse.nodered.org/t/dynamic-file-encoding/43434/2 "2021-03-31T08:39:34Z")

</div>

hmmm yes - not a bad idea. Maybe if it's set to anything other than default then that is "fixed" - if left as default then if `msg.encoding` exists use that.

---

<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: [30 May 2021 08:39 UTC](https://discourse.nodered.org/t/dynamic-file-encoding/43434/3 "2021-05-30T08:39:56Z")

</div>

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