Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Allow Unicode symbols such as flags #163

Open
Anuskuss opened this issue Nov 18, 2017 · 8 comments
Open

Feature Request: Allow Unicode symbols such as flags #163

Anuskuss opened this issue Nov 18, 2017 · 8 comments

Comments

@Anuskuss
Copy link

I don't know if this has to happen in Kodi or the addon but it would be nice if I could use flags in my m3u playlist.

@phunkyfish
Copy link
Member

I would imagine it would require both. Do you mean flags as in country flags?

@kekukui
Copy link

kekukui commented May 1, 2020

Regional identifiers are defined in ISO 3166-1 as follows:

  • flag image
  • 2-letter alpha
  • 3-letter alpha
  • number

In unicode this is implemented as code pairs which produce an image of the 2 letter alpha (not image of flag)

https://apps.timwhitlock.info/emoji/tables/iso3166
https://en.wikipedia.org/wiki/Regional_Indicator_Symbol

To display the actual flag, the platforms unicode implementation would have to contain flag images instead of 2 letter alpha images. Supporting unicode will get you an image of 2 letter country codes. If you want actual flags, you might have to replace the platforms unicode library. The addon cannot supply flag images, only support unicode. But the 2 letter alpha is sufficient to distinguish national origin.

Flag images reference

https://en.wikipedia.org/wiki/ISO_3166-1
https://www.countryflags.com/en/
https://www.countryflags.com/en/emoji-overview

@phunkyfish
Copy link
Member

Kodi supports Unicode alright but as to how I read or pass that to Kodi I have no idea I’m afraid.

@kekukui
Copy link

kekukui commented May 1, 2020

ok I have run some tests on Windows & Linux. This is what I found:

  • You must choose the Arial font in Settings / Interface or there will be no unicode support in any addon
  • Every time you change the skin, the font will be reset and you will have to choose Arial again
  • When Arial is enabled, international language character sets are correctly displayed in IPTVsimple
  • It appears that all Kodi addons will display the following characters correctly (example)

∆ (2206)
Ӆ (04C5)
ֆ (0586)

  • The following characters are NOT displayed correctly in Kodi even if the platform unicode library supports them (example)

֎ (058E)
😁 (1F601) emoji
🇦🇮 (1F1E6+1F1EA) country code or flag image (depends on unicode library)

I therefore conclude that the missing support for emoji & country code is a Kodi bug, not a problem with IPTVsimple. I think the Arial font in Kodi may need to be updated because (0586) and (058E) both appear in the Character Map for Arial on the Windows platform but only (0586) will display in Kodi.

@phunkyfish
Copy link
Member

Nice. Can you give an example M3U entry that works with Unicode?

Do any of the flags work?

@kekukui
Copy link

kekukui commented May 2, 2020

Can you give an example M3U entry that works with Unicode?

https://iptv-org.github.io/iptv/index.m3u

Do any of the flags work?

No. In order to see any kind of regional identifier which is supported by unicode, Kodi needs to support that first. I am just pointing out that IPTVsimple does not need to be modified to support unicode. I know there are some Windows apps that dont support unicode even though the OS supports it. And some terminal applications on Linux (such as "vi") dont support unicode. So I modified other Kodi addons and found that those example characters which did not work will not be rendered on screen in any Kodi addon. I think there is nothing you can do to fix the issue here: We already have unicode support in IPTVsimple, but Kodi only has a partial implementation. The proof that we have unicode support is when you see oriental alphabets in channel names rendered on screen.

https://en.wikipedia.org/wiki/Script_(Unicode)

This is working in IPTVsimple on LibreELEC with all of the channels I tested, and it works in the YouTube addon (if your skin font is Arial based.) The bottom line is, Kodi lacks support for the subset of unicode which includes emoji & regional identifiers. If those characters appear in some addon source text that will be rendered on screen, they will all be rendered as a .notdef glyph (which represents valid unicode characters that cannot be rendered by the selected font.) The .notdef symbol used by Kodi's "Arial" font is a white vertical rectangle ▯ (25AF). But the rendering of unicode characters from non-latin alphabets is working in IPTVsimple, so we do support unicode here. The problem appears to be in Kodis fonts and/or unicode implementation. I can see why users think we dont support unicode when Estuary's default font does not even render some alphabets correctly. And we need to see some support in Kodi/Estuary for unicode regional identifiers before we can debate whether those identifiers should be a country code or a flag. Whoever fixes that issue in Kodi/Estuary can also add support for emoji (which is needed in Kodi because its allowed in YouTube video titles & descriptions.)

@phunkyfish phunkyfish changed the title Feature Request: Allow Unicode Feature Request: Allow Unicode symbols such as flags May 5, 2020
@phunkyfish
Copy link
Member

This is a really good explanation. Thanks.

@phunkyfish phunkyfish pinned this issue May 5, 2020
@dagwieers
Copy link

Yup, we have this on our wishlist as well. Would be nice to have emojis/icons for things like geo-blocked content or list-items that are being "followed" or tagged as "watch later".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants