Re: [gdal-dev] Are unicode field values supported in the Python bindings for GDAL?

2012-04-11 Thread Paolo Corti
On Tue, Apr 10, 2012 at 11:49 PM, Roy Hyunjin Han starsareblueandfara...@gmail.com wrote: In GDAL 1.9.0 and Python 2.7.2,    feature.SetField(0, u'xxx') raises the following exception    NotImplementedError: Wrong number of arguments for overloaded function 'Feature_SetField'.    Possible

Re: [gdal-dev] Are unicode field values supported in the Python bindings for GDAL?

2012-04-11 Thread Roy Hyunjin Han
Le 11 avril 2012 03:38, Paolo Corti pco...@gmail.com a écrit : this will work: feat.SetField(0, u'xxx'.encode('utf-8')) Yes, but you can't decode it after saving the file. feature.SetField2() forces conversion using str() feature.SetField() tries to convert unicode to latin-1 git

Re: [gdal-dev] Are unicode field values supported in the Python bindings for GDAL?

2012-04-11 Thread Paolo Corti
On Wed, Apr 11, 2012 at 12:43 PM, Roy Hyunjin Han starsareblueandfara...@gmail.com wrote:    WORD = 'Спасибо'.decode('utf-8')    # UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128)    WORD = 'Спасибо'.decode('utf-8')    # Some characters

Re: [gdal-dev] Are unicode field values supported in the Python bindings for GDAL?

2012-04-11 Thread Roy Hyunjin Han
Le 11 avril 2012 08:02, Paolo Corti pco...@gmail.com a écrit : Not sure what you are trying to do, and pretty sure that this is definitely obvious for you and not related at all to GDAL, but it seems to me that you are trying to encode in latin1 and ascii a string that contains characters not

Re: [gdal-dev] Are unicode field values supported in the Python bindings for GDAL?

2012-04-11 Thread Roy Hyunjin Han
Hi Andrey, Do you know what is the status of native unicode/utf-8 support in GDAL? http://trac.osgeo.org/gdal/wiki/rfc5_unicode RHH Currently, using the Python SWIG bindings for GDAL 1.9.0, feature.SetField(0, u'xxx') raises the following exception NotImplementedError: Wrong number

Re: [gdal-dev] Are unicode field values supported in the Python bindings for GDAL?

2012-04-11 Thread Ari Jolma
For the record, In the Perl bindings all strings going to GDAL internals are upgraded from Perl internal format to utf-8 and all strings coming from GDAL internals are marked for Perl to be utf-8. This is done in the Perl typemaps after a change last November (#23405). I don't see a similar

[gdal-dev] Are unicode field values supported in the Python bindings for GDAL?

2012-04-10 Thread Roy Hyunjin Han
,int,int,int,int,int) SetField(OGRFeatureShadow *,char const *,int,int,int,int,int,int,int) Rouault mentioned the same error. http://lists.osgeo.org/pipermail/gdal-dev/2010-September/026156.html Are unicode field values supported in the Python bindings for GDAL