Dynamic file encoding


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 and add that possibility?


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.

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