2016-11-28 33 views
0

我使用TVHeadend作为电视对网络服务器。它有一个用于频道列表和电子节目指南(EPG)等JSON API。我的问题是,EPG数据有时包含重音字符,这会导致iOS客户端窒息。JSON数据中的奇数字符,替换为“外卖字符”?

为了调试,我在macOS上使用Postman来检查从服务器获得的数据。下面是在邮差看“坏”数据的EPG条目的一个示例:

{ 
    "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." 
}, 

正如你所看到的,邮递员“翻译”在外卖的重音字符。这很好,所以有人知道他们用来做这件事的逻辑吗?

回答

0

问题很可能在TVHeadend配置中,并且与通道符合所需字符集有关。我不认为你可以在接收端修复它。

你可能想看看这个线程的详细信息:

https://tvheadend.org/issues/1775

+0

所以这个问题是TVH旧存储EPG数据。因此,当您更改配置时,您可能会或可能不会更改您收到的数据。这非常令人困惑,因为您可能看不到您的更改结果。最后,我在客户端编写代码来过滤掉所有这些。 –