On 12/8/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>
> limodou wrote:
>
> >> Why not use unicode object directly ?
> >>
> >> dict={"adviser":u"n.顾问, <美> (学生的)指导老师","od":"dd"}
> >>
> > because django will auto convert unicode to DEFAULT_CHARSET encoding,
> > so you got may be not a unicode string
>
> even if you pass the unicode object to simplejson? sound weird.
No, I just say you may got a unicode string, but not say you *must*
got a unicode string.
>
> using non-ASCII strings in 8-bit string literals is deprecated in
> Python, and won't work in mixed encoding environments (e.g. if your
> editor or terminal uses another encoding than what you want in the
> file, you're out of luck).
>
>
--
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
-~----------~----~----~----~------~----~------~--~---