"Italo Maia" <[EMAIL PROTECTED]> writes:

> Noticia(SQLObject):
>     autor=UnicodeCol()
>     message=UnicodeCol()
>
> in the tg-admin shell
>
>>>> Noticia(autor=u"me",message=u"é")
>>>> Noticia.get(1).mensagem
>>>> u'\x82'

This is correct.  You're printing the __repr__ that is really the internal
representation of the string.  You should either print it or convert it to
something that makes sense on the screen.

>>>> print Noticia.get(1).mensagem
>>>> [fucking crazy error]

The "f" word doesn't sound all that nice on a mailing list...  There are much
better ways to express things.

As I already told you, if your terminal isn't capable of showing Unicode you
won't see it.

> Notice i didn't even commit anything. And notice this:
>
>>>> x = "á"
>>>> y= u"á"
>>>> x
>>>> y

Nothing is shown?

>>>> print x
>>>> print y

Again nothing?

> and something really weird goes now:
>>>> x == y ## guess what this shows?!

It depends on your configuration.  I'd expect some sort of Exception since it
should try casting one of the strings to your default charset.  In Python it
is ASCII, so the Unicode casting should fail.



-- 
Jorge Godoy      <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to