[New-bugs-announce] [issue34135] The results of time.tzname print broken.

김태환 report at bugs.python.org
Tue Jul 17 00:52:03 EDT 2018


New submission from 김태환 <maxtortime at gmail.com>:

When I call time.tzname at Korean Windows. (Microsoft Windows 10 Pro(10.0.17134 Build 17134))

It prints like below. This problem occurred Python 2 and 3 both.
>>> import time
>>> time.tzname
('´ëÇѹα¹ Ç¥ÁؽÃ', '´ëÇѹα¹ Àϱ¤ Àý¾à ½Ã°£')

I used chardet for getting correct tzname.
>>> import chardet
>>> tzname = [tzn.encode('latin-1').decode('cp949') for tzn in time.tzname]
>>> tzname
['대한민국 표준시', '대한민국 일광 절약 시간']

I think that cause of this problem is tzname encoded by 'latin-1' at Window s.

----------
components: Windows
messages: 321790
nosy: paul.moore, steve.dower, tim.golden, zach.ware, 김태환
priority: normal
severity: normal
status: open
title: The results of time.tzname print broken.
type: behavior
versions: Python 2.7, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34135>
_______________________________________


More information about the New-bugs-announce mailing list