I’m trying to create an email parser for notifications. The problem is, that the notifications are send in HTML-only and they are using ISO-8859-2 encoding.
When I execute IMAP node with Resolved/Simple formats, here’s what I see in html property:
E-mail zostaďż˝ wygenerowany automatycznie, prosimy na niego nie odpowiadaďż˝.
With RAW I get:
E-mail zosta� wygenerowany automatycznie, prosimy na niego nie odpowiada�.
(RAW also mentions encoding: This is an S/MIME signed message ------271FA8CCD25A514291379894969B4570 Content-Type: text/html; charset=iso-8859-2 Content-Transfer-Encoding: 8bit Date: Thu, 22 Jun 2023 17:19:36 +0200)
In order to properly work with this, I need to convert to UTF-8:
E-mail został wygenerowany automatycznie, prosimy na niego nie odpowiadać.
How can I achieve that? I tried converting it with jschardet + iconv-lite, but when the data gets to the Code node, it has already become ASCII (that’s at least how jschardet detects it as)