I check the post that the browser does, and it's utf-8, so forget my theory about ISO-8859-1.
I'm using UnicodeCol.
I'm sorry to be a pain, but can you explain this to me?
in WebConsole:
>>> ps = Project.select(AND(Project.q.userID == 1, Project.q.name == 'cão'))
>>> ps.count()
0L
>>> ps = Project.select(AND(Project.q.userID == 1, Project.q.name == u'cão'))
>>> ps.count ()
Traceback (most recent call last):
........
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe3' in position 80: ordinal not in range(128)
>>> ps = Project.select(AND(Project.q.userID == 1, Project.q.name == u'cão'.encode('utf-8')))
>>> ps.count()
0L
thanks,
Bruno
On 7/12/06, Jorge Godoy <[EMAIL PROTECTED]
> wrote:
"Bruno Silva" <[EMAIL PROTECTED] > writes:
> I don't know why, but doing encode in select seem's to resolve this issue.
> Ex:
> projects = Project.select(AND(Project.q.userID == user.id,
> Project.q.name == project_name.encode('utf-8')))
There's still something being handled in ISO-8859-1 or ASCII... Are you sure
you defined your columns as UnicodeCol instead of StringCol and your
validators as UnicodeString instead of String?
--
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
-~----------~----~----~----~------~----~------~--~---

