Difference between u'string' and unicode(string)

Viewed 2354

This is a sample program i made:

>>> print u'\u1212'
ሒ
>>> print '\u1212'
\u1212
>>> print unicode('\u1212')
\u1212

why do i get \u1212 instead of ሒ when i print unicode('\u1212')?

I'm making a program to store data and not print it, so how do i store ሒ instead of \u1212? Now obviously i can't do something like:

x = u''+unicode('\u1212')

interestingly even if i do that, here's what i get:

\u1212

another fact that i think is worth mentioning :

>>> u'\u1212' == unicode('\u1212')
False

What do i do to store ሒ or some other character like that instead of \uxxxx?

2 Answers
Related