Skip to content

Instantly share code, notes, and snippets.

@helloncanella
Last active January 1, 2017 01:43
Show Gist options
  • Save helloncanella/a008c2f40c1201ff0d3654580d8cc4b3 to your computer and use it in GitHub Desktop.
Save helloncanella/a008c2f40c1201ff0d3654580d8cc4b3 to your computer and use it in GitHub Desktop.
latin1 to utf-8
fetch('http://www.band.uol.com.br/rss/colunista_64.xml').then(res=>res.arrayBuffer()})
.then(arrayBuffer => iconv.decode(new Buffer(arrayBuffer), 'iso-8859-1').toString())
.then(converted => console.log(converted))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment