[Qgis-developer] Problems with utf-8 in attribute tables
Bernhard Ströbl
bernhard.stroebl at jena.de
Wed Jul 8 03:03:32 PDT 2015
Hi Christian,
what type of layer are you writing in? Is the layer's source utf-8
encoded and is its coding set to utf-8?
When I encountered encoding problems I found this [1] site very
informative and also fun to read.
Bernhard
[1] http://www.joelonsoftware.com/articles/Unicode.html
Am 08.07.2015 um 11:39 schrieb Boehnke, Christian:
> Hello,
>
> we try to write non-ASCII characters inside of a QGIS python plugin.
> There is no problem with the script but with the attribute table, where
> the characters are not written in utf-8 or sth. else (see attachment).
> Any suggestions?
>
> Here is an example of our code to fill the attribute table. Row means a
> list entry which is utf-8 coded.
>
> for row in cursor.fetchall():
>
> # add feature
>
> feat = QgsFeature()
>
> feat.setGeometry(
> QgsGeometry.fromPoint(QgsPoint(row[3], row[4])) )
>
>
> feat.setAttributes([row[1], row[2], row[3], row[4], self.path, row[0],
> row[5]])
>
> provider.addFeatures([feat])
>
> Christian Böhnke
>
>
>
> __________ Information from ESET Mail Security, version of virus
> signature database 11907 (20150708) __________
>
> The message was checked by ESET Mail Security.
> http://www.eset.com
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> __________ Information from ESET Mail Security, version of virus signature database 11907 (20150708) __________
>
> The message was checked by ESET Mail Security.
> http://www.eset.com
>
__________ Information from ESET Mail Security, version of virus signature database 11907 (20150708) __________
The message was checked by ESET Mail Security.
http://www.eset.com
More information about the Qgis-developer
mailing list