[Live-demo] [OSGeo] #689: NaturalEarth Character Encodings

OSGeo trac_osgeo at osgeo.org
Wed Jan 1 23:50:13 PST 2014


#689: NaturalEarth Character Encodings
-----------------------+----------------------------------------------------
 Reporter:  darkblueb  |       Owner:  darkblueb                   
     Type:  defect     |      Status:  new                         
 Priority:  normal     |   Milestone:  OSGeoLive7.5                
Component:  LiveDVD    |    Keywords:  7.0, natural earth, upstream
-----------------------+----------------------------------------------------

Comment(by darkblueb):

 looking for "zeroes", I found these in a particular terminal:
   {{{
   262 | Å\u009EÉ\u0099ki                             | c3 85 c2 9e c3 89
 c2 99 6b 69
   188 | AÄ\u009Fstafa                                | 41 c3 84 c2 9f 73
 74 61 66 61
  4526 | Ä\u0090á»\u0093ng Bằng Sông Há»\u0093ng   | c3 84 c2 90 c3 a1
 c2 bb c2 93 6e 67 20 42 c3 a1 c2 ba c2 b1 6e 67 20 53 c3 83 c2 b4 6e 67 20
 48 c3 a1 c2 bb c2 93 6e 67
  4109 | Ã\u0087anakkale                              | c3 83 c2 87 61 6e
 61 6b 6b 61 6c 65
  4139 | Ã\u0087orum                                  | c3 83 c2 87 6f 72
 75 6d
  4157 | Ã\u0087ankiri                                | c3 83 c2 87 61 6e
 6b 69 72 69
 }}}

 however, a quick lookup in UTF8 shows those chars in the block {{{U+AC00 –
 U+D7AF Hangul Syllable}}}


 The query :

   {{{
 select gid,name,py_hexdump(name) from prov_admin1_ne;
 }}}


   {{{
 CREATE or REPLACE FUNCTION py_hexdump ( in_str text)
   RETURNS text
 AS $$
   if in_str is None or in_str == '':
     return ''

   resT = ' '.join(x.encode('hex') for x in in_str)
   return resT

 $$ LANGUAGE plpythonu;

 }}}

-- 
Ticket URL: <http://trac.osgeo.org/osgeo/ticket/689#comment:25>
OSGeo <http://www.osgeo.org/>
OSGeo committee and general foundation issue tracker.


More information about the Osgeolive mailing list