Skip to content

charset latin1 not working #1561

@danielsalles

Description

@danielsalles

Summary

I can not make charset work. I am making request for a page that deals with charset=iso-8859-1, and even setting { charset: 'latin1' }, correct decoding does not happen.

I'm following this #869

I've tried latin1 and latin-1

  // url to open bases results
  const url = `http://www.stf.jus.br/portal/jurisprudencia/listarJurisprudencia.asp?s1=%28SAUDE+COMPLEMENTAR%29&base=baseAcordaos&url=http://tinyurl.com/y9e68odp`

  // request first page
  axios.get(url, {}, { charset: 'latin-1' })
    .then(({ data }) => {
      console.log(data)
    })

Context

  • axios version: v0.18.0
  • Environment: node v10.1.0

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions