Hi..
Consider this example: in a regular python shell, typing u"č" ==
unicode('č', 'utf8') returns true. In tg-admin shell it doesn't, which
could cause some problems with inserting into Unicode() fields in
database.

For example (in tg-admin shell):
>>> MySqlClass(intfield=3, myunicodefield=u"č")
would result in garbled entry in the database.
If I write this:
>>> MySqlClass(intfield=3, myunicodefield="č")
the entry would look ok in database but SQLAlchemy would issue a
warning that I didn't provide a unicode object.

So what I did was to modify turbogears/commands/base.py - in
raw_input() method of CustomShell I changed "return
code.InteractiveConsole.raw_input(self, *args, **kw)"
to "return code.InteractiveConsole.raw_input(self, *args,
**kw).decode('utf-8')"

Now for me it works fine until I upgrade TG as I have utf8 terminal.
Is this something I should file a new ticket on trac for? What do you
think about this (consider international users which deal with Unicode
a bit more than US users)?
Thanks,
matej
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to