[mapserver-users] ASCII -> UTF-8 convert problems for importing (GIS) data

Guillaume Sueur guillaume.sueur at neogeo-online.net
Fri Apr 18 11:27:27 EDT 2008


maybe you should set postgresql client encoding to the specific dataset 
encoding for the import. See this param in postgresql.conf

regards,

Guillaume

Stefan Schwarzer a écrit :
>>> Hi there,
>>>
>>> hmm.... I have a shapefile, which has some unorthodox characters (Ç,
>>> ì, ...). Now, when importing the file (via shp2pgsql) into postgres,
>>> it complains about it not being UTF-8 (my database has that format).
>>>
>>> So, how can I convert either the dbf file or than in a later stage the
>>> created text file from (I guess) ASCII into UTF-8?
>>>
>>> Thanks for any hints,
>>>
>>> Stef_______________________________________________
>>
>> Hi,
>>
>> You have an option for shp2pgsql (-W I think) to tell shp2pgsql to 
>> convert
>> your data into this encoding:
> 
> Yep, tried that too. But I get this message:
> 
> shp2pgsql -s 4326 -I -W UTF-8 -D countries.shp gis.countries_new > 
> countries_new.sql
> Shapefile type: Polygon
> Postgis type: MULTIPOLYGON[2]
> utf8: Invalid or incomplete multibyte or wide character
> 
> We didn't really understand if the "-W" is to specify what the format is 
> (which we assumed) or into which format it has to be transformed.
> 
> So, we would need something  like transform ASCII into 
> UTF-8._______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 




More information about the mapserver-users mailing list