[Bug 1473533] Re: CountryNameDict function trying to parse UTF-8 iso3166.tab as US-ASCII

Sebastien Bacher seb128 at ubuntu.com
Tue Sep 29 13:07:06 UTC 2015


** Changed in: python-tz (Ubuntu)
   Importance: Undecided => High

** Changed in: python-tz (Ubuntu)
       Status: New => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1473533

Title:
  CountryNameDict function trying to parse UTF-8 iso3166.tab as US-ASCII

Status in pytz:
  Fix Released
Status in python-tz package in Ubuntu:
  Fix Committed
Status in python-tz package in Debian:
  New

Bug description:
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/pytz/+bug/1473533/+subscriptions



More information about the Ubuntu-sponsors mailing list