Project

General

Profile

"bad" characters in EPG

Added by Maury Markowitz over 5 years ago

I am using an iOS client (Apple TV) with TVH. The client uses Apple's NSJSONSerializer, which understands UTF data only (-8, -16, etc). It normally uses the header on the JSON request to decide how to decode it. However, I am seeing the EPG data contains accented characters that are not being UTF-8'ed - or something, I'm not entirely sure.

I called the server using Postman, and here is the result:

{
"eventId": 14277,
"episodeId": 14278,
"channelName": "49.3 CometTV",
"channelUuid": "02fe96403d58d53d71fde60649bf2b9a",
"channelNumber": "49.3",
"start": 1480266000,
"stop": 1480273200,
"title": "The Brain That Wouldn't Die",
"description": "Dr. Bill Cortner and his fianc�e, Jan Compton , are driving to his lab when they get into a horrible car accident. Compton is decapitated. But Cortner is not fazed by this seemingly insurmountable hurdle. His expertise is in transplants, and he is excited to perform the first head transplant. Keeping Compton's head alive in his lab, Cortner plans the groundbreaking yet unorthodox surgery. First, however, he needs a body."
},

As you can see, there is a "takeout" character in the description field. I noticed that the headers on the JSON always say it's UTF-8 even when I select a different format. For instance, my only Network is set to ISO-8895-1 but the header says JSON. So..

1) am I correct in thinking the server uses the charset selection to do conversion on its side?
2) is the data always UTF-8? that is, the header is correct?
23) If this data really is in UTF-8, shouldn't it be displaying properly? Postman definitely understands UTF-8!


Replies (2)

RE: "bad" characters in EPG - Added by Robert Cameron over 5 years ago

Just because the JSON file is UTF-8, it does not mean that the data going into was originally in UTF-8. You need to change the character encoding option for the guide data to set it was 8895-1 (or Latin 1 or whatever it is), so that the proper conversion can happen when sending the JSON out.

RE: "bad" characters in EPG - Added by Maury Markowitz over 5 years ago

I have tried that, with no apparent effect. However, this may be due to saved data. Is there a way to clear the database?

    (1-2/2)