HTTP GET request charset/encoding problem with special characters

Describe the problem/error/question

I am getting some special characters problem when doing a GET HTTP resquest to a URL.

For example: a GET to this URL: Lâmpada LED Tubo T8 18W 120cm 6500K Brilia Em Oferta | ALED

Is resulting in the characters problem below, I need them to be the right brazilian portuguese characters:

Please share your workflow

Information on your n8n setup

  • n8n version: 1.33.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): queue
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker/Railway
1 Like

Hi @dantearaujo!

Welcome to the community! :fireworks:

The HTTP Request node is reading the site’s content type as it is displayed. And the site’s encoding is in iso-8859-1, which is a bit old school. n8n uses UTF-8.

In order to convert the content type you’d need to install a library like iconv-lite and then add a Code Node to your workflow to convert the source code into UTF-8.

This will only work on a self-hosted environment, so good thing you’re already hosting :slight_smile:

If you want to go down that route, you can follow this article to help you set up the library.
This community post also has some useful info on importing a library to use in the Code Node

Hope this helps!

Happy Building! :building_construction:

3 Likes

Thanks a lot!

1 Like

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