diff -r 6f4a6ce4d9d2 Lib/locale.py --- a/Lib/locale.py Tue Nov 23 21:32:47 2010 +0100 +++ b/Lib/locale.py Wed Nov 24 14:07:57 2010 +0900 @@ -643,7 +643,7 @@ 'tactis': 'TACTIS', 'euc_jp': 'eucJP', 'euc_kr': 'eucKR', - 'utf_8': 'UTF8', + 'utf_8': 'UTF-8', 'koi8_r': 'KOI8-R', 'koi8_u': 'KOI8-U', # XXX This list is still incomplete. If you know more diff -r 6f4a6ce4d9d2 Lib/test/test_calendar.py --- a/Lib/test/test_calendar.py Tue Nov 23 21:32:47 2010 +0100 +++ b/Lib/test/test_calendar.py Wed Nov 24 14:07:57 2010 +0900 @@ -430,6 +430,9 @@ with self.assertRaises(calendar.IllegalMonthError): calendar.monthrange(2004, 13) +class LocaleHTMLCalendarTest(unittest.TestCase): + def test_formatyear_should_not_raise_locale_error(self): + calendar.LocaleHTMLCalendar().formatyear(2004, 3) def test_main(): support.run_unittest( @@ -439,6 +442,7 @@ SundayTestCase, TimegmTestCase, MonthRangeTestCase, + LocaleHTMLCalendarTest, ) diff -r 6f4a6ce4d9d2 Lib/test/test_locale.py --- a/Lib/test/test_locale.py Tue Nov 23 21:32:47 2010 +0100 +++ b/Lib/test/test_locale.py Wed Nov 24 14:07:57 2010 +0900 @@ -391,6 +391,13 @@ # crasher from bug #7419 self.assertRaises(locale.Error, locale.setlocale, 12345) + def test_setlocale_UTF8(self): + # failed on OSX from issue10498 + locale.setlocale(locale.LC_TIME, ('en_US', 'UTF8')) + + def test_getdefaultlocale_setlocale(self): + locale.setlocale(locale.LC_TIME, locale.getdefaultlocale()) + def test_main(): tests = [