catalinii / minisatip

minisatip is an SATIP server for linux using local DVB-S2, DVB-C, DVB-T or ATSC cards
https://minisatip.org
327 stars 80 forks source link

Define character encoding when serving state.json #1002

Closed Jalle19 closed 1 year ago

Jalle19 commented 1 year ago

Fixes #398

Before: Screenshot-20221011145440-1245x388

After: Screenshot-20221011145139-1243x348

Jalle19 commented 1 year ago

@lars18th @Yuri666 care to test this? I have very few service names with "special characters" in them so it's hard to tell if this is a definite fix or not.

Yuri666 commented 1 year ago

Not work for my provider: image To my provider needs charset=ISO-8859-5: image

Jalle19 commented 1 year ago

I think this needs a more complex fix then. The service name needs to be converted to Unicode from the character set indicates in the service information. I'll see if the logic can be easily copied from e.g. tvheadend's implementation.

Jalle19 commented 1 year ago

This is more than I bargained for so I'll close this for now

catalinii commented 1 year ago

Most of tvh implementation seems to be here. I think the charset is specified as part of the string. Before we bring something complete maybe we can use the encoding that is defined in the SDT. At least for the ppl watching channels from one country it will work.

catalinii commented 1 year ago

https://github.com/tvheadend/tvheadend/blob/5f9404117f59ad1f5aa7ca542ce39d9e064e8209/src/input/mpegts/dvb_support.c#L260