[gdal-dev] Dealing with ogr2ogr and cyrillic TAB files
Koivusalo, Tuomas
tuomas.koivusalo at logica.com
Wed Oct 10 03:17:09 PDT 2012
Hello,
I'm trying to convert bunch of MapInfo TAB files from Russian customer to PostGIS using ogr2ogr. Original TAB files are in WindowsCyrillic encoding, and they should be somehow be converted to UTF-8. For some reason, it seems that ogr2ogr messes up encoding during conversion. If I try to convert TAB to Shapefile and from Shapefile to PostGIS end result is complete mess. Direct conversion from TAB to PostGIS seems to fail due to encoding problems (I have tried to set PGCLIENTENCODING, but end result doesn't seem to change).
I have managed to create correct Cyrillic output by running ogr2ogr to convert TAB to shape, and then creating SQL from shape and then running that SQL through perl-script which fixes the encoding, but as this includes two-bit characters to columns it causes all field length constraints to break.
Does anyone know way how to deal with these encoding issues in a way that doesn't require us to use any external scripts to create correct output?
-Tuomas Koivusalo
Think green - keep it on the screen.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121010/e6809dad/attachment.html>
More information about the gdal-dev
mailing list