Closed tomasbarrios closed 9 years ago
Try this PR https://github.com/TooTallNate/node-icecast/pull/15 Worked for me with the wrong-encoded metadata in stream
Perhaps try something like this (note depends on the iconv-lite
and chardet
modules from npm)?
var iconv = require('iconv-lite');
var chardet = require('chardet');
// ... rest of code
res.on('metadata', function (metadata) {
var encoding = chardet.detect(metadata);
var parsed = icecast.parse(iconv.decode(metadata, encoding));
console.error(parsed);
});
// ... rest of code
Currently when receiving accented characters, the metadata gets weird chars. Is this possible to fix?
Like "Café Tacuba" gets parsed as "Caf� Tacuba"