[postgis-users] shp2pgsql encoding problem - Thai Language

Ben Madin ben at remoteinformation.com.au
Wed Sep 16 02:00:47 PDT 2009


Thanks Mark,

On 16/09/2009, at 16:30 , Mark Cave-Ayland wrote:

> AFAICT shp2pgsql always outputs UTF-8 encoded text whenever the  
> input encoding is specified via the -W option.

OK - I completely misunderstood that bit.

> Note that shp2pgsql uses its own iconv conversion routines, and not  
> the PostgreSQL conversion routines. Hence if you take a look at the  
> iconv documentation here: http://www.gnu.org/software/libiconv/ you  
> can see that ISO-8859-11 is actually supported as a -W parameter.

Fantastic - I had just (for no reason) assumed it to be the same as  
PostgreSQL.

> Once your output file has been produced, you should be able to run  
> it directly into a UTF-8 encoded database without any problems. I do  
> agree that the documentation on this is a little vague though (I had  
> to refer to the source to see what was happening...)

Yes - after a quick seg fault trying to import a dbf file I had tried  
to convert to utf-8 using openoffice, it worked perfectly on the  
original file. Brilliant, thank you again.

I'm off to try it with the Chinese ones as well!

cheers

Ben


-- 

Ben Madin
REMOTE INFORMATION

t : +61 8 9192 5455
f : +61 8 9192 5535
m : 0448 887 220
Broome   WA   6725

ben at remoteinformation.com.au



							Out here, it pays to know...





More information about the postgis-users mailing list