Hi Tuomas,
Il giorno mer, 10/10/2012 alle 10.17 +0000, Koivusalo, Tuomas ha scritto: > 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). Setting PGCLIENTENCODING has alway worked for me, and both ways (it applies also to PG => MapInfo conversion). Make sure you're using the correct encoding specification: have you tried "WIN866", "WIN1251", "ISO_8859_5"...? > 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. You could convert TAB to MIF, process MIF with iconv, and load the processed file into postgis. One step less :) Hope this helps Sig ________________ PRIVACY Le informazioni contenute in questo messaggio sono riservate e confidenziali. Il loro utilizzo e' consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora Lei non fosse la persona a cui il presente messaggio è destinato, La invitiamo ad eliminarlo dal Suo Sistema e a distruggere le varie copie o stampe, dandone gentilmente comunicazione all’indirizzo mail del mittente. Ogni utilizzo improprio e' contrario ai principi del D.lgs 196/03 e alla legislazione europea (Direttiva 2002/58/CE). _________________________ PRIVACY Le informazioni contenute in questo messaggio sono riservate e confidenziali. Il loro utilizzo e' consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora Lei non fosse la persona a cui il presente messaggio è destinato, La invitiamo ad eliminarlo dal Suo Sistema e a distruggere le varie copie o stampe, dandone gentilmente comunicazione all’indirizzo mail del mittente. Ogni utilizzo improprio e' contrario ai principi del D.lgs 196/03 e alla legislazione europea (Direttiva 2002/58/CE). _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev