minisatip icon indicating copy to clipboard operation
minisatip copied to clipboard

Web-GUI: german umlauts not working in channel names

Open sumulu opened this issue 7 years ago • 11 comments
trafficstars

German umlauts like ü and ö are shown as question mark in column of the stream. Tested with Google Chrome and Mozilla Firefox.

umlauts

Looks like this names are written with JavaScript, I am not sure if utf8 is possible...

sumulu avatar Nov 26 '17 12:11 sumulu

Is this still an issue?

Jalle19 avatar Feb 11 '22 09:02 Jalle19

Is this still an issue?

Yes. Someone requires to target this.

lars18th avatar Feb 11 '22 11:02 lars18th

I'd give it a stab but I can't seem to find a single service with "odd" characters in the service name

Jalle19 avatar Feb 11 '22 13:02 Jalle19

@Jalle19 Here is a short TS sample if needed.

Channel is called:

één HD

sample.zip

bccrew avatar Feb 11 '22 14:02 bccrew

as workaround i just set web browser codepage to iso-8859-x

Yuri666 avatar Feb 11 '22 15:02 Yuri666

Good to know that's probably just a browser issue, not something being parsed incorrectly from the SDT. I'll have a look.

Jalle19 avatar Feb 11 '22 15:02 Jalle19

So, please prepare a PR with your fix. I tested in my current server and with a simple <meta charset="iso-8859-1"> inside the <head> and the problem isn't solved with Chrome. 😒

lars18th avatar Feb 11 '22 16:02 lars18th

just add extension https://chrome.google.com/webstore/detail/set-character-encoding/bpojelgakakmcfmjfilgdlmhefphglae to chrome and choose codepage

Yuri666 avatar Feb 11 '22 17:02 Yuri666

Hi @Yuri666 ,

So, yes it works with this extension and selecting the Western (ISO-8859-15). However, it will be preferable to edit the source HTML page, and set the correct values.

lars18th avatar Feb 11 '22 18:02 lars18th

I tried changing the charset but it didn't work. The issue must be deeper.

Jalle19 avatar Feb 11 '22 21:02 Jalle19

I'm having this problem as well. I have a channel with this character --> É It displays fine in TVheadend and Kodi but in the minisatip webui it comes out like �

I tried installing the google extension mentioned above and setting Western (ISO-8859-15) and UTF-8 but that didn't make any difference. I also edited the minisatip status.html page... I tried: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> and <meta http-equiv="Content-Type" content="text/html;charset="ISO-8859-1"/> But still that character comes out wrong on the webui.

When I view the source of the webpage the � character is there also instead it should be É. Maybe minisatip is not sending the character to the webpage correctly for display? Maybe it's already wrong by then so trying different charsets at that point won't make a difference?

Some more testing Maybe this is obvious to others but from this minisatip issue I just noticed how to view the json. I load this url in my browser: http://192.168.0.104:8080/state.json

And again I can see the incorrect character in the TV Channel name in: "ad_channel":["","","TV�","","","","","",.............

Some googling reveals this issue for an unrelated GitHub project but which discusses what appears to be a similar problem and it relates to defining a default charset (e.g: utf-8) when parsing an application/json request.

So I think the problem is with the JSON encoding, by minisatip, of the channel information currently playing in the TV adaptor and/or the processing of the json data to ?encapsulate it with the correct charset ... Or such is my limited and possibly incorrect understanding !

A bit more investigating I'm not a programmer but I wonder is this where a change could be made? In minisatip.c

    if (strcmp(arg[1], "/state.json") == 0) {
        char *buf = malloc1(JSON_STATE_MAXLEN);
        int len = get_json_state(buf, JSON_STATE_MAXLEN);
        http_response(s, 200,
                      "Content-Type: application/json\r\nConnection: close",
                      buf, 0, len);
        free(buf);
        return 0;
    }

Should utf-8 be specified like: Content-type: application/json; charset=utf-8 or maybe does the json need to be encoded?JSON-GLib is a library in C that could help with that.

I'm happy to help and test if anyone could code a solution or advise.

Flex

FlexMcMurphy avatar Jul 25 '22 23:07 FlexMcMurphy