[Gdal-dev] OGR2OGR / OCI / French character
Frank Warmerdam
warmerdam at pobox.com
Tue Jul 6 14:12:04 EDT 2004
François-Xavier Prunayre wrote:
> Hi,
> importing data to Oracle Spatial using ogr2ogr, French character are
> replaced by "?" ... any ideas ? Is this an Oracle configuration option,
> something to deal with NLS parameters ? or something with gdal ?
>
> Config : GDAL 1.2; Oracle 10g; under Suse 9.0 & Window XP
>
> Thanks a lot for your help.
>
> Francois
Francois,
I don't know off hand why this would be occuring. Are you seeing this
result when you use ogrinfo or just with ogr2ogr? I would encourage you
to test with ogrinfo as this will give a report less affected by particulars
of the ogr2ogr output format.
Internally I am just using a "SELECT <list of fields> FROM <table name>" to
fetch the field values. The result fetching is done based on the following
field binding:
OCIDefineByPos( hStatement, &hDefn, poSession->hError,
iParm+1,
(ub1 *) papszCurColumn[nOGRField], nBufWidth,
SQLT_STR, panCurColumnInd + nOGRField,
NULL, NULL, OCI_DEFAULT ),
As you can see the results are requested as datatype SQLT_STR. I don't do
anything special with regard to setting the OCI_ATTR_CHARSET_ID, or anything
else related to language rules.
It seems likely to me that the OCI library is taking care of converting
unusual characters into '?' during the fetch because I haven't setup appropriate
parameters. However, I don't know what I would be doing wrong, or how to fix
it off hand.
I would try and investigate some more, but I would have to boot to the handed
Windows XP partition. I should really get an instance working properly on
Linux.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list