[gdal-dev] Re: No support for widestrings in ArcSDE driver for OGR ?
Ragi Y. Burhum
ragi at burhum.com
Mon Oct 27 16:17:21 EDT 2008
On Mon, Oct 27, 2008 at 8:33 AM, <gdal-dev-request at lists.osgeo.org> wrote:
>
> Message: 1
> Date: Mon, 27 Oct 2008 08:02:10 +0000
> From: Anders Moe <anders.moe at geocap.no>
> Subject: [gdal-dev] No support for widestrings in ArcSDE driver for
> OGR ?
> To: <gdal-dev at lists.osgeo.org>
> Message-ID: <BLU111-W60C7F1AFF2A5BEFECAE26FF2240 at phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> 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?
Thanks,
- Ragi Yaser Burhum
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20081027/ca5014bd/attachment.html
More information about the gdal-dev
mailing list