[gdal-dev] OCI driver and setting the client encoding

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Thu Sep 20 11:06:41 PDT 2012


Ivan Lucena <ivan.lucena <at> princeton-ma.us> writes:

> So, if I understood it, you are using ogr2ogr in a Finnins-Finland 
Windows locale but Oracle is set for
> american.america and the OGR/OCI driver doesn't make the distinction
automatically.

Not really, our Oracle is set to Finnish-Finland and UTF-8
> 
> Does your data has Finnins-Finland characters on it?

The primary data source is Spatialite which is using UTF-8 internally. 
Thus I would say that my data does not has Finnish characters, it has 
UTF-8 characters, but without setting NLS_LANG the OGR OCI driver does 
not consider them as UTF-8 but something else. I suppose that a more 
correct NLS_LANG setting for my input data would be
finnish_finland.UTF8. I tested with that and the result was correct,
too. I am not sure what hhappens with shapefiles; the dbf file has 
ISO-8859-1 encoding on my computer but it looks like ogr2ogr with 
OCI driver is changing the encoding on-the-fly to something else, 
perhaps to UTF-8.

I volunteer to test anything that a non-programmer can test for 
getting an understanding about how the OCI driver is handling different 
character encodings and help in documenting the behaviour. 

-Jukka Rahkonen-



 
> >  Is this the right thing to do? If yes, will it work also for other 
locales and
> >  could it thus be worth mentioning in the OCI documentation
> >  http://www.gdal.org/ogr/drv_oci.html? Could it even be initialized
automatically
> >  by the OCI driver?
> 
> Check that link for more information: 
> 
> http://www.oracle.com/technetwork/database/globalization/nls-lang-099431.html

Just the page that was leading me to right direction.

> Regards,
> 
> Ivan
> 






More information about the gdal-dev mailing list