Problem in Modul "calendar"
Verfasst: Montag 10. August 2009, 13:15
Hi,
sollte man dies als Bug oder als Feature ansehen:
Letzteres nutzt als Locale bei mir Deutsch und wird wahrscheinlich mit dem März nicht klarkommen. Sollte man dieses Verhalten als gewollt ansehen oder ist das ein Fehler?
sollte man dies als Bug oder als Feature ansehen:
Code: Alles auswählen
In [1]: import calendar
In [2]: cal = calendar.HTMLCalendar()
In [3]: with open('test.html', 'w') as f:
...: f.write(cal.formatyear(2009, 8))
...:
...:
In [4]: cal = calendar.LocaleHTMLCalendar()
In [5]: with open('test.html', 'w') as f:
f.write(cal.formatyear(2009, 8))
...:
...:
---------------------------------------------------------------------------
UnicodeEncodeError Traceback (most recent call last)
/home/sebastian/<ipython console> in <module>()
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 2588: ordinal not in range(128)