I want to show Unicode text (Persian text) in Jupiter. Currently, I use from HTML widget to show the text likes the following:
# title is unicode
title_value = widgets.HTML(value = title)
But, I've gotten the following error:
TraitError: Could not decode '\xd9\xbe\xda\x98\xd9\x88 405 \xd9\x85\xd8\xb4\xda\xa9\xdb\x8c \xd9\x81\xd8\xb1\xd9\x88\xd8\xb4 90 91' for unicode trait 'value' of a HTML instance.
Anyhow, when print
the title the result would be in Persian.
What supposed to resolve the issue?
I should have mentioned that encode("utf-8")
does not work properly, as I want to show the Unicode text!