Love the nl_NL touch Cheers, AT
On Wed, Nov 9, 2011 at 2:21 PM, Tom Evans <[email protected]> wrote: > On Wed, Nov 9, 2011 at 4:03 PM, Niels <[email protected]> wrote: > > Worse: > >>>> locale.getdefaultlocale() > > (None, None) > > > > Still i'd say this should be handled better than bailing out with an > error. > > Something like .. .decode(locale.getdefaultlocale()[1] or 'ascii', > 'ignore') > > > > You simply need to set an appropriate LANG in your environment: > > > > $ env LANG=nl_NL.UTF-8 /usr/local/bin/python > Python 2.7.1 (r271:86832, Dec 13 2010, 15:52:15) > [GCC 4.2.1 20070719 [FreeBSD]] on freebsd8 > Type "help", "copyright", "credits" or "license" for more information. > >>> import locale > >>> locale.getdefaultlocale() > ('nl_NL', 'UTF-8') > > > Cheers > > Tom > > -- > You received this message because you are subscribed to the Google Groups > "Django users" 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/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" 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/django-users?hl=en.

