I am writing a small module that downloads Google's list of supported 
devices as csv, but I get it with a BOM I struggle to remove.

Here is my code snippet:

// url = http://storage.googleapis.com/play_public/supported_devices.csv

downloadFile: function(url, cb) {
        .header('Upgrade-Insecure-Requests', '1')
        .header('Accept-Encoding', 'gzip, deflate, sdch')
        .end(function(response) {
            let content = response.body;

            fs.writeFile('google_devices.csv', content, 'utf8', (err) => {


            return cb(null, url);



file starts with 뿯붿

Tried a few bom-strip libraries, but could not make it work

Please advise

Job board: http://jobs.nodejs.org/
New group rules: 
Old group rules: 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to