[mapserver-users] ASCII -> UTF-8 convert problems for importing (GIS) data
Stefan Schwarzer
stefan.schwarzer at grid.unep.ch
Fri Apr 18 08:12:30 PDT 2008
>> 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.
More information about the MapServer-users
mailing list