JSON数据中的奇数字符被替换为“外卖字符”?

时间:2016-11-28 13:23:33

标签: postman

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

为了调试,我在macOS上使用Postman来检查我从服务器获取的数据。以下是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."
},

正如你所看到的,邮差已经在翻译中“翻译”了重音字符。这很好,所以有人知道他们用来做这个的逻辑吗?

1 个答案:

答案 0 :(得分:0)

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

您可能需要查看此主题以获取更多信息:

https://tvheadend.org/issues/1775