Unknown encoding: iso-8859-1 on HTTP Request

Describe the problem/error/question

My node worked well in the previous version. But currently, I had a problem with the Charset of the response
I also set the Content-Type with charset=latin1, didn’t work.

What is the error message (if any)?

Unknown encoding: iso-8859-1
Error code
ERR_UNKNOWN_ENCODING

NodeApiError: Unknown encoding: iso-8859-1 at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:1649:33) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:722:19) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:670:51 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1100:20

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.60.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker Compose, queue mode
  • Operating system: Ubuntu22

I updated to the latest version 1.64.3, the issue still there

Hi @Le_nAm,

Can you try setting both the media type as well as the charset, so setting the value to application/json; charset=iso-8859-1 ?

Just tried, issue still be there
image

Tried with curl on the server hosting n8n, this is the response’s header:

< content-type: text/html; charset=iso-8859-1

I did try with text/html; charset=iso-8859-1 still not work

This is still affecting me and is quite significant. All this API is showing is 5.1.1 from this GET url, for the version ID of the release:

https://hangar.papermc.io/api/v1/projects/Viabackwards/latest?channel=Release

This happens because I looked at the content type like this person has:

zy97N01

But after looking further, this broke on the 15th, when I believe is when I updated n8n, so what is going on here? I am now on the latest as this post states. Not sure what I was on before.

Thanks, Jas.

Hmm, it’s been almost a week, and I couldn’t find a solution for this…

I upgraded to 1.66.0 , but this status hasn’t been resolved.
Team please help

For me setting the response format to “Text” helped getting a correct response, after I got the same error.

for my case, it returned 429 - Too many requests LoL

Check the docs of your API. Most APIs have rate limits. You can add options in the HTTP Request node to batch the requests and add a timeout.
It’s good that you know the real error now. So seems like it also solved it for you :slight_smile:

I think it not because my API endpoint, cause I have an old version of n8n, and I just ran it without errors

Hi everyone, this seems to be an issue with the “Auto Detect” option under “Response → Response Format” in the HTTP node. By default, this setting is set to “Autodetect”. However, when I manually select “JSON” (or any other format), it works perfectly without returning the iso-8859-1 error.

This was fixed in this PR, and released in 1.71.0.

3 Likes

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