Encoding error in PostgreSQL index plugin

Hi,

I use Postgresql plugin to store orthanc indexes (files are stored on filesystem).
DB has been created with utf8 charset encoding, and some instances can’t be stored :

`
PluginsManager.cpp:163] Exception in database back-end: Error in PostgreSQL: ERREUR: séquence d’octets invalide pour l’encodage « UTF8 » : 0xe9 0x6e 0x65

ServerIndex.cpp:815] EXCEPTION [The plugin implementing a custom database back-end does not fulfill the proper interface]
ServerContext.cpp:268] Store failure
`

Is there a way to be sure every instance can be stored, whatever its encoding charset is ?

Marc

Please could you provide a sample DICOM file?

File joined.
There’s an accent in InstitutionName value, maybe this is the cause, but I checked with native SQlite index and it is stored correctly.

orthanc_postgresql_encoding_error.dcm (3.33 MB)

Hello,

I’m unable to reproduce your problem with the file you sent (against a PostgreSQL 9.3 server running under Linux).

I wonder whether this could be a configuration problem within your PostgreSQL server (perhaps related to Windows?). Unfortunately, I’m not a PostgreSQL expert, so I cannot solve this issue by myself.

Maybe someone on the list has an idea?

Regards,
Sébastien-