[pywin32-bugs] [ pywin32-Bugs-2706383 ] Crash getting time zone info
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2009-03-25 00:34:14
|
Bugs item #2706383, was opened at 2009-03-23 11:26 Message generated for change (Settings changed) made by jaraco You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=2706383&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pythonwin Group: v1.0 (example) >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Bernhard (bernhard_bender) Assigned to: Jason R. Coombs (jaraco) Summary: Crash getting time zone info Initial Comment: The following code crashes when the local time zone is a unicode string (e.g. contains German umlauts): import win32timezone tzi = win32timezone.TimeZoneInfo.local() This is probably due to the use of "str" type for standard_name and daylight_name in class TIME_ZONE_INFORMATION ---------------------------------------------------------------------- >Comment By: Jason R. Coombs (jaraco) Date: 2009-03-24 20:33 Message: Fixed in rev 1.28. Tested in Windows Vista with French Language pack and Russian Language Pack. I added a unit test as well to prevent this issue from arising in the future. Bernhard, thanks for the bug report and patch! ---------------------------------------------------------------------- Comment By: Bernhard (bernhard_bender) Date: 2009-03-23 16:20 Message: Some more info: python 2.5.2 win32 extensions build 213 WinXP SP2 German Crash occurs when time zone set to +0100: "Westeuropäische Normalzeit" (umlaut-a) Does not crash when set to -0500: "Eastern Normalzeit" (pure ASCII) The attached pathc is a very simple fix that prevents the crash. I may break other places though, as it changes the types of time zone names to unicode() ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=2706383&group_id=78018 |