[mythtv-users] Browsing UPnP "By title" + international characters = bug [PATCH]

David Kubicek foceni at gmail.com
Sat Nov 6 18:45:12 UTC 2010


On 6.11.2010 18:24, David Kubicek wrote:
> On 19.6.2010 01:29, Svend Høst wrote:
>> A recording has been made and the title from the epg contains danish
>> letters "æ/ae,ø/oe and å/aa".
>> If i try to locate and play the recording by upnp and browsing the
>> upnp tree By Date, the recording is shown properly.
>> If i choose By Title no content is streamed to my player, so the
>> recording is there and it is properly recorded since i can see it
>> when choosing by date.
>>
>> From the log :
>> 2010-06-19 00:30:16.119 HTTPRequest::ProcessSOAPPayload :
>> "urn:schemas-upnp-org:service:ContentDirectory:1#Browse" :
>> 2010-06-19 00:30:16.413 UPnpCDS::HandleBrowse ObjectID=RecTv/1,
>> ContainerId=
>> 2010-06-19 00:30:16.431 UPNP Browse : Searching for : RecTv  /
>> ObjectID : RecTv/1
>> 2010-06-19 00:30:16.449 UPnpCDSTv::IsBrowseRequestForUs - Not sure...
>> Calling base class.
>> 2010-06-19 00:30:16.548 HTTPRequest::SendResponse(xml/html) () :200
>> OK -> 172.17.14.200 <http://172.17.14.200>: 1
>> 2010-06-19 00:30:31.478 HTTPRequest::ProcessSOAPPayload :
>> "urn:schemas-upnp-org:service:ContentDirectory:1#Browse" :
>> 2010-06-19 00:30:31.566 UPnpCDS::HandleBrowse
>> ObjectID=RecTv/1/key=Bonder�ven retro, ContainerId=
>> 2010-06-19 00:30:31.586 UPNP Browse : Searching for : RecTv  /
>> ObjectID : RecTv/1/key=Bonder�ven retro
>> 2010-06-19 00:30:31.605 UPnpCDSTv::IsBrowseRequestForUs - Not sure...
>> Calling base class.
>> 2010-06-19 00:30:31.699 HTTPRequest::SendResponse(xml/html) () :200
>> OK -> 172.17.14.200 <http://172.17.14.200>: 1
>
> I've had the same issue - living in the Czech Republic, many shows and
> movies have the Czech diacritics (CP: iso-8859-2 / win1250) in them.
> Until now, I had to use "By Date", which was a bit of a pain in the
> ass to be honest.
>
> I never looked into it before, just a bit of googling, and I haven't
> found anybody with the same issue, so I thought it was a local problem
> in my setup. Probably nobody ever reported it - except you, that is.
> :) About an hour ago, I noticed your email by pure chance and it
> helped me to see that my situation was the same: the bug with empty
> folders via UPnP appeared only for shows with Czech characters -- I
> never noticed that, thought the issue was "random".
>
> For example: "*By Title*" browsing displayed a folder "*C(erná zmie
> (18)*", but when I clicked it open on PS3 or in Totem on the desktop,
> it was *empty*. Locating the show via "*By Date*" played it without fail.
>
> So, I checked the source in my local MythTV 0.23-fixes repo and
> indeed, there was a bug in handling UTF8 requests. US coders didn't
> expect the search filters to contain UTF8 characters, so they used
> .toLatin1() conversions all around the place. I'm attaching a simple
> fix, switching from .toLatin1() to .toUtf8() fixes the whole issue.
> Applying to upstream is as simple as "search and replace".
>
> Some of the 11 conversions don't actually need .toUtf8(), but it
> doesn't hurt either. Developers can apply just those parts that are
> required.
>
> -- 
> David Kubicek

New ticket for this issue: http://svn.mythtv.org/trac/ticket/9188

-- 
David Kubicek

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20101106/8c9824ef/attachment.htm>


More information about the mythtv-users mailing list