Comment 0 for bug 1473533

Revision history for this message
Martin Jansa (martin-jansa) wrote :

Since tzdata-2015e there are UTF-8 characters in iso3166.tab, see:
http://mm.icann.org/pipermail/tz/2015-May/022258.html
http://mm.icann.org/pipermail/tz/2015-June/022306.html

pytz/__init__.py:_CountryNameDict(LazyDict) is using:
        zone_tab = open_resource('iso3166.tab')
        try:
            for line in zone_tab.readlines():
                line = line.decode('US-ASCII')

to read it and fails on AX, CI, RE lines, using UTF-8 fixes the issues and should work OK even with older tzdata releases.