jellyfin-plugin-webhook icon indicating copy to clipboard operation
jellyfin-plugin-webhook copied to clipboard

[Bug] Incorrect Cyrillic letters display

Open lyaschuchenko opened this issue 2 years ago • 6 comments

Hi there! Have a problem with sending cyrillic overviews to Telegram This is example

\"caption\": \"Ім'я троянди (1986) був доданий на media.liashchuk.xyz\n1327 &#1088;&#1110;&#1082;. &#1059; &#1090;&#1086;&#1074;&#1072;&#1088;&#1080;&#1089;&#1090;&#1074;&#1110; &#1089;&#1074;&#1086;&#1075;&#1086; &#1084;&#1086;&#1083;&#1086;&#1076;&#1086;&#1075;&#1086; &#1091;&#1095;&#1085;&#1103; &#1040;&#1076;&#1089;&#1086; &#1095;&#1077;&#1088;&#1085;&#1077;&#1094;&#1100;-&#1092;&#1088;&#1072;&#1085;&#1094;&#1080;&#1089;&#1082;&#1072;&#1085;&#1077;&#1094;&#1100; &#1042;&#1110;&#1083;&#1100;&#1075;&#1077;&#1083;&#1100;&#1084; &#1041;&#1072;&#1089;&#1082;&#1077;&#1088;&#1074;&#1110;&#1083;&#1100;&#1089;&#1082;&#1110;&#1081; &#1088;&#1086;&#1079;&#1089;&#1083;&#1110;&#1076;&#1091;&#1108; &#1089;&#1077;&#1088;&#1110;&#1102; &#1090;&#1088;&#1072;&#1075;&#1110;&#1095;&#1085;&#1080;&#1093; &#1089;&#1084;&#1077;&#1088;&#1090;&#1077;&#1081; &#1095;&#1077;&#1085;&#1094;&#1110;&#1074; &#1074; &#1073;&#1077;&#1085;&#1077;&#1076;&#1080;&#1082;&#1090;&#1080;&#1085;&#1089;&#1100;&#1082;&#1086;&#1084;&#1091; &#1084;&#1086;&#1085;&#1072;&#1089;&#1090;&#1080;&#1088;&#1110; &#1085;&#1072; &#1087;&#1110;&#1074;&#1085;&#1086;&#1095;&#1110; &#1030;&#1090;&#1072;&#1083;&#1110;&#1111;. &#1047;&#1072; &#1074;&#1089;&#1110;&#1084;&#1072; &#1094;&#1080;&#1084;&#1080; &#1089;&#1084;&#1077;&#1088;&#1090;&#1103;&#1084;&#1080; &#1082;&#1088;&#1080;&#1108;&#1090;&#1100;&#1089;&#1103; &#1089;&#1090;&#1088;&#1072;&#1096;&#1085;&#1072; &#1090;&#1072;&#1108;&#1084;&#1085;&#1080;&#1094;&#1103;, &#1110; &#1085;&#1077;&#1079;&#1072;&#1073;&#1072;&#1088;&#1086;&#1084; &#1042;&#1110;&#1083;&#1100;&#1075;&#1077;&#1083;&#1100;&#1084; &#1087;&#1077;&#1088;&#1077;&#1082;&#1086;&#1085;&#1091;&#1108;&#1090;&#1100;&#1089;&#1103;, &#1097;&#1086; &#1082;&#1083;&#1102;&#1095; &#1076;&#1086; &#1088;&#1086;&#1079;&#1082;&#1088;&#1080;&#1090;&#1090;&#1103; &#1079;&#1072;&#1075;&#1072;&#1076;&#1082;&#1080; &#1083;&#1077;&#1078;&#1080;&#1090;&#1100; &#1091; &#1074;&#1080;&#1103;&#1074;&#1083;&#1077;&#1085;&#1085;&#1110; &#1076;&#1088;&#1077;&#1074;&#1085;&#1100;&#1086;&#1075;&#1086; &#1087;&#1077;&#1088;&#1075;&#1072;&#1084;&#1077;&#1085;&#1090;&#1091;, &#1103;&#1082;&#1080;&#1081; &#1089;&#1091;&#1074;&#1086;&#1088;&#1086; &#1086;&#1093;&#1086;&#1088;&#1086;&#1085;&#1103;&#1108;&#1090;&#1100;&#1089;&#1103; &#1090;&#1072; &#1079;&#1073;&#1077;&#1088;&#1110;&#1075;&#1072;&#1108;&#1090;&#1100;&#1089;&#1103; &#1074; &#1090;&#1072;&#1108;&#1084;&#1085;&#1110;&#1081; &#1073;&#1110;&#1073;&#1083;&#1110;&#1086;&#1090;&#1077;&#1094;&#1110; &#1084;&#1086;&#1085;&#1072;&#1089;&#1090;&#1080;&#1088;&#1103;...\n\n<b>Тривалість</b>\n02:11:30\"

lyaschuchenko avatar Nov 19 '22 02:11 lyaschuchenko

I have the same problem,

developer-wlj avatar Nov 21 '22 10:11 developer-wlj

Probably related to #144 . Thank you!

Coro365 avatar Feb 09 '23 06:02 Coro365

have additional information

[2023-04-07 03:21:07.186 +03:00] [WRN] Notification failed with response status code BadRequest: "{\"ok\":false,\"error_code\":400,\"description\":\"Bad Request: message caption is too long\"}"

lyaschuchenko avatar Apr 07 '23 00:04 lyaschuchenko

I'm having a similar issue with non-english characters being sent to ntfy. Seems to just effect the overview for me so I can't use it in my templates.

cgp-pd avatar Sep 14 '23 18:09 cgp-pd

Doh. Think I've solved it by simply changing to a 'Triple-Stash' variable in my templates:

{{Overview}} to {{{Overview}}}

Not familiar with handlebars but it looks like expressions are HTML-escaped by default which was causing the issue. If anyone else is encountering this then it's worth checking - the example templates use a mix of both formats - I had just been cut and pasting and didn't even notice the different syntax used for the overview.

cgp-pd avatar Sep 20 '23 15:09 cgp-pd

https://github.com/jellyfin/jellyfin-plugin-webhook/issues/148#issuecomment-1727931307

{{Overview}} to {{{Overview}}}

This method fixed it, thank you very much

Coro365 avatar Sep 21 '23 15:09 Coro365