UTF-8 symbols in ListItem
#1
Hi,

Is it somehow possible to display different kinds of symbols in the xbmcgui.ListItem label?

Symbols like these, e.g. hearts, stars and so on:

http://www.utf8-chartable.de/unicode-utf...ng-literal

Code:
'\xc2\xa9'.decode('utf-8')  # copyright symbol, works
'\xe2\x98\x85'.decode('utf-8') # black star, does not work
Reply
#2
please elaborate. 'does not work' reports are not really useful.
please provide your code, steps to reproduce, Debug Log, etc...
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Ok, I am using the xbmcswitf2 "wrapper", and I am setting the labels like so:

Code:
items = [{
        'icon': '',
        'thumbnail': '',
        'label': 'some text, and some symbols here',
        'path': plugin.url_for('list', username=username, slug=list['slug'], page=1)
    } for list in lists]

Using the strings above, I get the copyright symbol (basic latin block) to show up, but not any symbols from the unicode 'Miscellaneous Symbols' block.
Not sure if python/kodi even supports that?

EDIT: I do not get any errors, it just doesn't show up. I guess it might be a font issue?
Reply
#4
yes, most likely the fontfile included by the skin you're using simply do not contain those characters.

you might want to try with Confluence and select the 'Arial based' font.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply

Logout Mark Read Team Forum Stats Members Help
UTF-8 symbols in ListItem0