New submission from Christian Heimes:

The patch fixes the failing unit tests for time and strptime on German
and probably other Windows installations.

-                       ret = PyUnicode_FromStringAndSize(outbuf, buflen);
+                       ret = PyUnicode_Decode(outbuf, buflen,
+                                              TZNAME_ENCODING, NULL);

----------
components: Extension Modules
files: py3k_win_strftime.patch
messages: 56675
nosy: tiran
severity: normal
status: open
title: Patch for strftime problem on German Windows
type: behavior
versions: Python 3.0
Added file: http://bugs.python.org/file8595/py3k_win_strftime.patch

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1314>
__________________________________
Index: Modules/timemodule.c
===================================================================
--- Modules/timemodule.c	(revision 58603)
+++ Modules/timemodule.c	(working copy)
@@ -528,7 +528,8 @@
 			   e.g. an empty format, or %Z when the timezone
 			   is unknown. */
 			PyObject *ret;
-			ret = PyUnicode_FromStringAndSize(outbuf, buflen);
+			ret = PyUnicode_Decode(outbuf, buflen, 
+					       TZNAME_ENCODING, NULL);
 			PyMem_Free(outbuf);
 			return ret;
 		}
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to