How to convert the csv file from UTF-8 BOM format to UTF-8

Describe the problem/error/question

Hi Team,

I’m trying to upload a CSV file into the HTTP node, but it leads to an error. I need to convert the file from UTF-8 BOM to UTF-8.

  1. How can I convert a CSV file from UTF-8 BOM to UTF-8?
  2. Does the n8n HTTP node support the UTF-8 BOM format?
  3. How can we handle cases where the API only supports the UTF-8 format?

What is the error message (if any)?

Please share your workflow

Above workflow is just an example!!

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 0.234.1
  • Database (default: SQLite): postgresql
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: MAC

Hi @Gouravdev

to answer your questions:

  1. You would need to upgrade and set the node to ignore BOM, If you are not able to upgrade as an embed user you can update the node in your own fork to handle this.

  2. When sending data the HTTP Request node will send whatever you give it, If you have UTF-8 data it will send that, If it is ISO-8859-1 it will use that

  3. To ensure you are only using UTF-8 data you would need to make sure you correctly convert the data before sending it.

Hope this helps! :raised_hands:

1 Like

Thanks, @ria.

  1. Currently, I am not able to upgrade the version. How can I achieve this without upgrading?
  2. How can I convert the data before sending it? In my current workflow, how can I achieve this?

Hi everyone,

Any updates on this issue?

@barn4k @ThinkBot @Jon, do you have any ideas on how to address this problem?

  • How can we convert UTF-8 BOM to UTF-8, or remove the BOM from it? Currently, I am receiving UTF-8 BOM output from the Spreadsheet File node.

Thanks!

Hi,

If you‘re able to install community nodes, than this is the easiest way. Install n8n-nodes-text-manipulation - npm

There‘s an option to strip out BOM.

any other way as its not possible for me to upgrade the system.

1 Like

Simply - you can’t. You have to update the version. :slight_smile:

In more complex words - maybe it’s possible via the code node, but I don’t know, the version is too old, so I can’t test it

1 Like

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