> > No, I just say you may got a unicode string, but not say you *must*
> > got a unicode string.
>
> sorry, you lost me there.  assuming you're still using Python to run
> your Django program, surely u"" gives you a unicode string ?  and surely
> that string will be properly encoded and decoded by simplejson?
>
Ok, I don't just say the string is come from python, but maybe come
from django itself. for example:

a = Model.objects.get(id=xxx)

a.name comes from django queryset result, so it will be encoded with
DEFAULT_CHARSET, so it's not unicode. And you should convert it to
unicode. Of cause you can convert it to unicode manually, and the
other way you can use a public method to do this thing. Both are the
same.

-- 
I like python!
UliPad <<The Python Editor>>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to