Related to #800, running this on Windows with Python 2.7:
from dateutil import tz
tz.gettz('🐼')
Raises an error:
self = tzwin(u'\U0001f43c'), name = '🐼'
def __init__(self, name):
self._name = name
with winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) as handle:
tzkeyname = text_type("{kn}\\{name}").format(kn=TZKEYNAME, name=name)
> with winreg.OpenKey(handle, tzkeyname) as tzkey:
E UnicodeEncodeError: 'ascii' codec can't encode characters in position 56-57: ordinal not in range(128)
dateutil\tz\win.py:220: UnicodeEncodeError
Even if tz.tzwin doesn't support unicode names, tz.gettz should not be raising an error in this situation.
Related to #800, running this on Windows with Python 2.7:
Raises an error:
Even if
tz.tzwindoesn't support unicode names,tz.gettzshould not be raising an error in this situation.