I think this is what you want ...
import unicodedata def eval_unicode(s):
or a “comprehensive” solution for those who prefer this style:
import unicodedata def eval_unicode(s):
But beware, there are many unicode values that don't seem to have the numeric value assigned in python (e.g. ⅜⅝ don't work ... or maybe this is just a question with my xD keyboard).
Another implementation note: “too reliable,” it will work even with distorted numbers, such as “123½3 ½”, and will evaluate it to 1234.0 ... but it will not work if there is more than one point.
source share