On Jan 30, 11:36 am, Domen Kožar <ielect...@gmail.com> wrote: > I somewhat figured out that my u'strings' get encoded to latin, even > though utf-8 is set as OS locale, vim encoding and python source > encoding. > > After fiddling around, I got that far:http://paste.pocoo.org/show/101978/ > > Any idea what could trigger such behaviour?
You need to put # -*- coding: utf-8 -*- as one of the few first lines in your pytohn files. That way Python knows what encoding your strings are written in. (there's a pep about this too). The interactive python interpreter behaves a little different since it uses the locale when started and assumes strings are written in that locales charset. I guess the Pylons shell doesn't implement this same thing (ipython has the same bug). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---