Search Postgresql Archives

importing from a file with UTF-8 escape characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to import the geonames table from
http://download.geonames.org/export/dump/allCountries.zip.  A PostgreSQL
user recommended using:

create table geonames (
         geonameid       int,
         name            varchar(200),
         asciiname        varchar(200),
         alternatenames  varchar(4000),
         latitude        float,
         longitude       float,
         fclass  char(1),
         fcode   varchar(10),
         country varchar(2),
         cc2 varchar(60),
         admin1  varchar(20),
         admin2  varchar(80),
         admin3  varchar(20),
         admin4  varchar(20),
         population      bigint,
         elevation       int,
         gtopo30         int,
         timezone varchar(40),
         moddate         date
 );

but some lines in the file have strings of the form:

5881673	{1}útsaw Lake	{1}utsaw Lake		62.699499389	-136.737319993	H	LK	CA		12				0		600	America/Dawson	2006-01-18

which I take as UTF-8 escaped characters.  Any tips on how to import
this into the table so that they print properly?  Thanks.

Cheers,

-- 
Seb


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux