Spreadsheet Node gets encoding wrong but there is workaround

Hello, when using the spreadsheet node on a file downloaded via the HTTP Request node, I get bad encoding (see screenshots):

https://cloud.gravi.best/index.php/s/T2KefGYbMKbct3p
https://cloud.gravi.best/index.php/s/YKigRzLRC3J3tEF

There is a workaround to this (while it would’ve been nice to have an option directly in the Spreedsheet node):

  1. create a FunctionItem node
  2. enter following javascript code:
    item.nom = decodeURIComponent(escape(item.nom))
    item.dork = decodeURIComponent(escape(item.dork))
    return item;
  3. replace “nom” and “dork” by your csv column names. You are also free to add support for more columns by duplicating one of the top lines
  4. enjoy a happy life free of encoding problems

Result:

cloud.gravi.best/index.php/s/WkMBsADKgtsqP4A

Lastly:

hope it helps someone else
thanks to the author of this software and contributors
why can’t I upload images directly on discourse ?

1 Like

Thanks a lot for that report! Can you please supply an example file that I can debug with it. I will then have a look and fix it.

Actually uploading images should be possible. I guess it has to do with your “reputation” as it was your first post ever in the forum.

Hello ! It seems I made an invalid report.

While trying to reproduce the supposed bug, I found out that my office software was the one at fault here.
Manually editing the csv file with vim instead of LibreOffice fixed the problem.

Anyway if you want to take a look, here is a completely normal and working workflow implying accents and spreadsheets (spreadsheet url is included in http request node and at the end of this post):

.csv download url in case you want it: https://cloud.gravi.best/index.php/s/HKWmpdWKjiF4L8J
While it may look weird in office softwares, it is ok with vim.


I’ll be more careful with future bug reports, don’t worry. Humans are strange; computer so are

No problem. That can happen to everybody.

I just tested with n8n. Started with your workflow. Then transformed it back to CSV, saved it and then opened with Libre Office. That file looks then great in Libre Office. But if I just download the file with my browser and open it then I have the same problem you have. Seems like it uses different character-encoding. If I manually change it in the Libre Office Import Dialog from “UTF-8” to “Latin 3(ISO-8859-3)” everything gets displayed correctly again.

1 Like