Scraper XML SearchStringEncoding attribute not used bug

this cause wrong charset in search url
Plex 0.7.7

I have found a little bug is the library.
I have movies named in russian language and using KinoPoisk scraper. But when it searching for a movie with russian name it should convert filename into CP1251.

  <scraper name="KinoPoisk.ru" content="movies" thumb="KinoPoisk.gif"><br />
	<CreateSearchUrl dest="3" SearchStringEncoding="CP1251">


But right now filename is converted into UTF-8, because plexapp still using "GetServerContentEncoding" (which is deleted from xml) exept of "GetSearchStringEncoding" (as used in XBMC for now) for parsing url from xml. This cause database to show the same movie name for all russian named files, because kinopoisk show the same movie for wrong charset request.

/xbmc/utils/IMDB.cpp line 480:

	// convert to utf8 first (if necessary), then to the encoding requested by the parser<br />
	g_charsetConverter.unknownTo(m_parser.GetServerContentEncoding(), strSearch2, m_parser.m_param[0]);<br />
	CUtil::URLEncode(m_parser.m_param[0]);


I suggest to change it to:

	// convert to utf8 first (if necessary), then to the encoding requested by the parser<br />
	g_charsetConverter.unknownTo(m_parser.GetSearchStringEncoding(), strSearch2, m_parser.m_param[0]);<br />
	CUtil::URLEncode(m_parser.m_param[0]);


or take it from XBMC trunk.

Thanks.

UPD: Just found the Lighthouse, submitted there too - [#263](http://plexapp.lighthouseapp.com/projects/14382-plex/tickets/263)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.