4532: Patch for Windows (by josip)

svn: r16386
This commit is contained in:
Jérôme Rapinat
2011-01-15 09:43:34 +00:00
parent 51f239f53b
commit 5c8a3f7488
5 changed files with 37 additions and 4 deletions

View File

@@ -21,6 +21,7 @@
# $Id$
import locale
import constfunc
"""
Some OS environments do not support the locale.nl_langinfo() method
@@ -131,7 +132,10 @@ try:
except:
import time
codeset = locale.getpreferredencoding()
if constfunc.win():
codeset = locale.getlocale()[1]
else:
codeset = locale.getpreferredencoding()
month_to_int = {
unicode(time.strftime('%B',(0,1,1,1,1,1,1,1,1)),codeset).lower() : 1,