https://bugzilla.wikimedia.org/show_bug.cgi?id=32798

--- Comment #9 from Daniel Zahn <dz...@wikimedia.org> 2011-12-06 11:01:48 UTC 
---
as a note: even though this works again, while looking at this i found there
may still be room for improvement in the way planet tries to set the locale in
the first place.. the code is:

---
 if config.has_option("Planet", "locale"):
        # The user can specify more than one locale (separated by ":") as
        # fallbacks.
        locale_ok = False
        for user_locale in config.get("Planet", "locale").split(':'):
            user_locale = user_locale.strip()
            try:
                locale.setlocale(locale.LC_ALL, user_locale)
            except locale.Error:
                pass
            else:
                locale_ok = True
                break
        if not locale_ok:
            print >>sys.stderr, "Unsupported locale setting."
            sys.exit(1)

---

But people say:

"You should not pass an explicit locale to setlocale, it is wrong. Let it find
out from the environment. You have to pass it an empty string"

http://stackoverflow.com/questions/955986/what-is-the-correct-way-to-set-pythons-locale

and problems in general with this not working cross-platform

"correct locale name has different names on different installations of python."

http://permalink.gmane.org/gmane.comp.web.planet.devel/889

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to