Ragi Y. Burhum wrote:
On Mon, Oct 27, 2008 at 8:33 AM, <[EMAIL PROTECTED]
Hi all
Throughout GDAL 1.5 and 1.6+ I havent been able to reading most
strings from ArcSDE using OGR, which is probably caused by the
ArcSDE drivers lack of widestring support (?). Is this correct, or
am I doing something wrong ? I'm pretty desperate for this to work
now. Seems as if a lot of ArcSDE data is stored as widestrings,
which seriously limits the applicability of my connection. Could
anyone give me an update on this ? I've tried looking at the tickets
but failed to find an entry that adressed this issue. Thanks,
Anders.
Starting from 9.3 (or was it 9.2?) the strings created by ArcCatalog are
widestring by default. I took a quick look at ogrsdelayer.cpp and
ogrsdedatasource.cpp and that code is only consuming the non-Unicode API.
Frank: I did see that OGRSDELayer::Initialize(..) maps an OGR
OFTWideString (a type that the documentation says it is deprecated) to
an SDE widestring (i.e. SE_NSTRING_TYPE) if #SE_NSTRING_TYPE is defined,
however OGRSDELayer::TranslateSDERecord() does not have a case statement
for SE_NSTRING_TYPE (and therefore has no call to SE_stream_get_nstring
<http://edndoc.esri.com/arcsde/9.3/api/capi/schemaobjects/streams/strmgetnstring.htm>).
A quick fix to at least be able to consume the sde unicode strings would
be to add that case for that switch statement and take the result and
encode the UTF16 string to UTF8.
I would fix it myself and submit a patch, but ironically enough, I don't
have a way to test it or compile it since I don't have ArcSDE nor ArcGIS
anywhere... should I submit a ticket?
Ragi,
I'm in the same position - no SDE instance to test against. A patch might
be good if either Howard or Anders are willing to commit to testing it out.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, [EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev