[mythtv-commits] Ticket #12791: search returns data in ISO-8859-1 but header calls it UTF-8

MythTV noreply at mythtv.org
Thu Jun 2 10:38:19 UTC 2016


#12791: search returns data in ISO-8859-1 but header calls it UTF-8
---------------------------------------+-----------------------------
 Reporter:  dekarl                     |          Owner:  stuarta
     Type:  Bug Report - General       |         Status:  accepted
 Priority:  minor                      |      Milestone:  0.28.1
Component:  Services - Icon Downloads  |        Version:  Master Head
 Severity:  medium                     |     Resolution:
 Keywords:                             |  Ticket locked:  0
---------------------------------------+-----------------------------
Changes (by stuarta):

 * status:  new => accepted
 * version:  Unspecified => Master Head
 * milestone:  unknown => 0.28.1


Comment:

 The backend database is storing data in UTF-8,
 so we need to translate some strings which are
 invalid in UTF-8 to UTF-8 before doing the lookup.

 Example log showing this
 {{{
 I, [2016-06-01T13:30:02.543869 #18053]  INFO -- : Started POST "/channel-
 icon//search" for XX.XX.XX.XX at 2016-06-01 13:30:02 +0000
 I, [2016-06-01T13:30:02.545446 #18053]  INFO -- : Processing by
 ChannelIconController#search as HTML
 I, [2016-06-01T13:30:02.545605 #18053]  INFO -- :   Parameters: {"s"=>"RMC
 Découverte", "csv"=>"\"RMC D\xE9couverte\",\"C4135.telerama.fr\",\"RMC
 D\xE9couverte\",\"10\",\"0\",\"0\",\"8442\",\"2564\"\n"}
 I, [2016-06-01T13:30:02.587081 #18053]  INFO -- : Completed 500 Internal
 Server Error in 41ms (ActiveRecord: 37.9ms)
 F, [2016-06-01T13:30:02.588021 #18053] FATAL -- :
 ArgumentError (invalid byte sequence in UTF-8):
   app/models/channel_icon/icon_finder.rb:89:in `is_blocked?'
   app/models/channel_icon/icon_finder.rb:109:in `is_blocked'
   app/models/channel_icon/icon_finder.rb:147:in `block (2 levels) in
 search'
   app/models/channel_icon/icon_finder.rb:146:in `block in search'
   app/models/channel_icon/icon_finder.rb:143:in `each'
   app/models/channel_icon/icon_finder.rb:143:in `search'
   app/controllers/channel_icon_controller.rb:88:in `search'
 }}}

--
Ticket URL: <https://code.mythtv.org/trac/ticket/12791#comment:1>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list