[gdal-dev] Proposed UTF-8 SWIG Changes
Ari Jolma
ari.jolma at gmail.com
Tue Sep 28 11:36:16 EDT 2010
On 09/27/2010 05:31 PM, Frank Warmerdam wrote:
> Even, Tamas, Ari, Howard, and other SWIG wise men,
>
> I got lost last night in the SWIG typemaps we use for GDAL, but
> eventually
> I came up with a minimal patch that seems to make sense and work. I
> would
> appreciate it if you guys could skim it and let me know if I'm doing
> things
> in a really wrong or dangerous way.
>
> http://trac.osgeo.org/gdal/attachment/ticket/3766/utf8_swig.patch
ok with me, this does not break anything AFAI can see. I'll handle the
decode/encode for Perl in Perl.
> I am attempting to treat any const char * parameter named utf8_path via
> a custom typemap that uses the preexisting GDALPythonObjectToCStr() to
> convert it. This appears to take regular strings, and unicode strings
> properly in Python.
>
> In other languages there is no special processing except that I have also
> globally applied the NONNULL typemap to such parameters.
>
> If I got ahead with this, should I add utf8_path in the README.typemaps?
Please do. It's an optional typemap.
Best regards,
Ari
>
> Best regards,
More information about the gdal-dev
mailing list