tomas / needle

Nimble, streamable HTTP client for Node.js. With proxy, iconv, cookie, deflate & multipart support.

Home Page:https://www.npmjs.com/package/needle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong euro symbol

harryhays opened this issue · comments

For example, I get html with encoding <meta charset = "utf-8">

I am making multiple requests to the same url.

In response.body, I sometimes see the correct text:
&#x20AC; 9.99 <br>
But usually this text is incorrect:
&#xFFFD; &#xFFFD; 9.99 <br>

This text is always correct if I get text from
response.raw.toString ()

Also this text is always correct if I use the old version of "needle": "^ 2.2.4"

Is this using the same version of Node? (For version 2.2.4 or newer)

Same. I tried with the same result of the node version: 12.18.2 and 14.15.0

Example request ("needle": "^ 2.6.0",):
https://app.upflare.com/cart.php?a=add&domain=register
This happens on the .ch domain

<strong>.ch</strong>
...............................
<span class="tld-label">Renewal</span>
&#xFFFD;&#xFFFD;9.99<br>

Several months ago I saw similar behavior on other sites.

Could be related to #374