Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Request decode Mime Type: text/html; charset=ISO-8859-1 #8799

Open
eduardomazolini opened this issue Mar 4, 2024 · 1 comment
Open

Comments

@eduardomazolini
Copy link

Bug Description

Hello!
I need to scan a website with latin1 encoding.
The site's mimetype is correct.
However, the text has encoding errors.
I already found a way around it.

I forced the data as a file and placed a block of code afterwards.

//console.log("$binary",$binary) //const data = $binary.data.data //data.data not exist other bug //console.log("item.binary",item.binary) const binary = $input.item.binary const data = binary.data.data const bin = Buffer.from(data,'Base64') let text = '' if (binary.data.mimeType.includes('ISO-8859')){ text = bin.toString('latin1') } else { text = bin.toString() } return {data:text}

To Reproduce

  1. Include "Request HTML" do a GET to one page with mimetype
  2. Work around
    image
    image
    image
    I hid the output but believe me it is correctly coded.

Expected behavior

I expected not to need this outline, without there being errors in the text such as:
Regi�o => Região
gr�tis => grátis

Operating System

docker.n8n.io/n8nio/n8n

n8n Version

1.29.1

Node.js Version

v18.19.1

Database

SQLite (default)

Execution mode

main (default)

@eduardomazolini eduardomazolini changed the title HTTP Request decodeMime Type: text/html; charset=ISO-8859-1 HTTP Request decode Mime Type: text/html; charset=ISO-8859-1 Mar 4, 2024
@netroy
Copy link
Member

netroy commented Mar 4, 2024

@eduardomazolini Do you have a public URL that I could reproduce this issue with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants