[mapserver-users] ASCII -> UTF-8 convert problems for importing
stefan.schwarzer at grid.unep.ch
Fri Apr 18 11:12:30 EDT 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
>> created text file from (I guess) ASCII into UTF-8?
>> Thanks for any hints,
> You have an option for shp2pgsql (-W I think) to tell shp2pgsql to
> 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 >
Shapefile type: Polygon
Postgis type: MULTIPOLYGON
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