]> git.ipfire.org Git - thirdparty/tvheadend.git/commit
python: Handle incorrect utf-8 decodes.
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Tue, 25 Sep 2018 11:50:57 +0000 (12:50 +0100)
committerperexg <perex@perex.cz>
Wed, 26 Sep 2018 15:31:44 +0000 (17:31 +0200)
commitc3f3ab77febd72b3bd03fd37a76aff60ba2884e2
tree2cc47ac3cadfead0e107508065769bd85242ee99
parent3f90477707b8cafa53dae4410be426b86251f1aa
python: Handle incorrect utf-8 decodes.

Some broadcasts can have different charsets (such as iso-8859-1) but
we assume utf-8 unless user has set it correctly. So when decode fails
we get an exception.  So we now attempt to decode with error
replacement so user sees incorrect character.

This gives "u'Denise Th\ufffd\ufffd':" as the string returned instead
when the received name contains an é that is in iso-8859-1 instead of
utf-8.
lib/py/tvh/htsmsg.py