Hey. I know about the pep and how python source files are encoded, but the interactive shell is something completely different. I wonder on what local env variable does "shell" depend. Since I have all of them either sl_SI.UTF8 or en_GB.UTF-8.
On Jan 31, 1:39 am, Damjan <[email protected]> wrote: > On Jan 30, 11:36 am, Domen Kožar <[email protected]> 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 [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 -~----------~----~----~----~------~----~------~--~---
