fuzeman / Spotify2.bundle

Spotify music streaming for Plex (all platforms)
76 stars 45 forks source link

How to display character other than english? #55

Closed chienlim closed 8 years ago

chienlim commented 8 years ago

Found the problem in utils.py:

def normalize(text):
    if text is None:
        return None
    if type(text) is Framework.components.localization.LocalString:
        text = str(text)
    if type(text) is unicode:
        text = unicodedata.normalize('NFKD', text)
    return text.encode('ascii', 'ignore')

Not sure why encode the return text to ascii, replace this line:

 return text.encode('ascii', 'ignore')

to

 return text

fixed the problem.

fuzeman commented 8 years ago

When this plugin was originally built plex had issues decoding unicode characters on some operating systems, this is why all the characters are normalized currently. Not sure if plex has fixed unicode support yet..

chienlim commented 8 years ago

Thanks