Closed mhanney closed 11 years ago
Hey there @mhanney! Thanks for the patch. I've fudged it up a bit and committed only the test case, since the change to lib/parse.js
actually isn't necessary (your test case passes without it). Thanks!
Also, as to the "more elegant solution", in Node.js you pass around Buffer instances which represent raw bytes. You can turn these bytes into a JavaScript String instance by calling .toString() and passing an encoding, a la "utf8"
, which you can see being done in the test case I've committed. Cheers!
Thanks for the explanation Nathan. I did not know about toString('utf8'). Also, I think I was testing using console.log, to a console over ssh that was not configured to display utf-8 chars so I assumed it wasn't working, when it probably was.
Mike.
On Tue, Jan 1, 2013 at 11:05 AM, Nathan Rajlich notifications@github.comwrote:
Hey there @mhanney https://github.com/mhanney! Thanks for the patch. I've fudged it up a bit and committed only the test case, since the change to lib/parse.js actually isn't necessary (your test case passes without it). Thanks!
Also, as to the "more elegant solution", in Node.js you pass around Buffer instances which represent raw bytes. You can turn these bytes into a JavaScript String instance by calling .toString() and passing an encoding, a la "utf8", which you can see being done in the test case I've committed. Cheers!
— Reply to this email directly or view it on GitHubhttps://github.com/TooTallNate/node-icecast/pull/6#issuecomment-11791870.
Thanks for this awesome library. I have a requirement to support utf-8 string in icecast metadata - for a classical radio station (many Italian, French, Spanish, German diacritic chars). I don't have much experience with node, but I was able to create a test and add string_decoder to parse the utf8 chars. It works for me but I suspect there is a more elegant solution.