Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Scrap a site iso-8859-1 Ar�bia #5

phstc opened this Issue · 3 comments

2 participants

Pablo Cantero Ștefan Rusu
Pablo Cantero


I'm trying to scrap a site with iso-8859-1

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

I'm getting � for the accents. How can I configure the encoding for iso-8859-1?

Pablo Cantero

Ștefan Rusu


For the moment, the encoding is not supported. The toString() method of the chunk buffer defaults the encoding to utf-8. You can save the raw response to a file, but I guess this is not what you want. http-get requires a patch to be able to pass a specific encoding if you're buffering the response body to a String object. I have plans to implement something in order to be able to return the buffer as Buffer object which would also fit the task.


Pablo Cantero

Hi @SaltwaterC

Tks for the reply.

Do you know other module that I can do it? I had this same problem with request module. :/

Pablo Cantero

Ștefan Rusu

Closed by relasing v0.4:

  • New option: bufferType for specifying the fact that the library should return the buffers as Buffer instance instead of String instance.
  • New option: encoding for specifying the encoding of the returned buffers, when returning the buffered data as string. Defaults to 'utf8'.

With this release people get generic buffer instances or strings in the designated encoding.

Ștefan Rusu SaltwaterC closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.