Excerpts from Marius Gedminas's message of Wed Nov 11 16:48:23 -0300 2009: > On Tue, Nov 10, 2009 at 04:43:54PM -0300, Mariano Mara wrote: > > Hi, I'm facing the current situation and I don't know how to fix it. > > What I want to do, of course, is to store unicode data, have unicode data > > in the database and retrieve unicode data. But I don't know what I'm > > missing. > > Your code looks correct to me. > > > If I try to store unicode data in the database, when I try to retrieve > > it all I get is garbage. > > A full example with paster shell (as you can see my database store > > garbage too): > > > > In [1]: x = model.Language() > > > > In [2]: x.id = u'es' > > > > In [3]: x.name = u'Español' > > I see from the shape of your prompt that you're using IPython. > > IPython has a bug where you cannot really input Unicode literals. > > Try it: > > $ ipython > In [1]: len(u'ñ') > Out[1]: 2 <--- WROOONG > > $ python > >>> len(u'ñ') > 1 <--- correct > > The bug is reported upstream and might even be fixed in ipython's trunk. > > Marius Gedminas
Thank you very much Marius, indeed I was having problems with Ipython. Mariano --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
