Segfault when returning a list of strings that have non utf8 characters.
I've not been able to produce a simple example demonstrating this, so don't really expect a fix. I'm reporting it in case someone else runs into the same problem.
I'm using PyGObject to access GExiv2, a GOBject wrapper around libexiv2. The get_tag_multiple
method should return a list of strings corresponding to the values in a photo metadata tag that allows repeated values (such as IPTC keywords).
https://lazka.github.io/pgi-docs/GExiv2-0.10/classes/Metadata.html#GExiv2.Metadata.get_tag_multiple
I have some files with metadata written many years ago by a Windows application that used the Latin-1 character encoding. If I use Python 2 the strings are not decoded so I can decode them with Latin-1 in my program. With Python 3 the strings are decoded as utf-8. If I use pgi then get_tag_multiple
raises a UnicodeDecodeError exception. With PyGObject I get a segfault.
The get_tag_string
method (which returns a single string) raises a UnicodeDecodeError exception as expected. However, I can only get the first keyword this way.