lyrics fetcher: convert lyrics from lyricsmania.com to utf8

This commit is contained in:
Andrzej Rybczak
2010-08-10 20:43:56 +02:00
parent e1b1cf838a
commit 923eaef466
2 changed files with 12 additions and 0 deletions

View File

@@ -221,5 +221,15 @@ bool MetrolyricsFetcher::isURLOk(const std::string &url)
return GoogleLyricsFetcher::isURLOk(url) && url.find("sitemap.xml") == std::string::npos;
}
/**********************************************************************/
void LyricsmaniaFetcher::postProcess(std::string &data)
{
// lyricsmania.com uses iso-8859-1 as the encoding
// so we need to convert obtained lyrics to utf-8
iconv_convert_from_to("iso-8859-1", "utf-8", data);
LyricsFetcher::postProcess(data);
}
#endif // HAVE_CURL_CURL_H