#20384: GeoIP doesn't support unicode path
----------------------------+---------------------------
     Reporter:  julian@…    |      Owner:  nobody
         Type:  Bug         |     Status:  new
    Component:  GIS         |    Version:  1.5
     Severity:  Normal      |   Keywords:  geoip unicode
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0           |      UI/UX:  0
----------------------------+---------------------------
 If the path that GeoIP should use is a unicode object it will fail to
 properly parse/identify the GeoIP databases.

 {{{
 >>> from django.contrib.gis.geoip import GeoIP
 >>> g = GeoIP(path='/path/to/GeoIP')
 >>> g.info
 'GeoIP Library:\n\t1.4.8\nCountry:\n\tGEO-106FREE [...]\nCity:\n\tGEO-
 533LITE [...]'
 >>> g = GeoIP(path=u'/path/to/GeoIP')
 >>> g.info
 'GeoIP Library:\n\t1.4.8\nCountry:\n\t\nCity:\n\t'
 }}}

 Tested this on Python 2.7. The same effect occurs in py3k, but getting it
 to work there in the same way would require using byte literals in
 {{{django/contrib/gis/geoip/base.py", line 92, in __init__}}}.


 Using Linux kernel 3.8.5-1-ARCH, ext4 filesystem and Python 2.7.4.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20384>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to