If anyonw is interested i had the same problem with taskcomments.
Activiti 5.16.3 with postgres.
The soluction i found was to modify CommentEntity.java in activiti-engine to handle UFT-8 encoding while saving and reading the comment from the blob column.
Extract from org/activiti/engine/impl/persistence/entity/CommentEntity
<java>
public byte[] getFullMessageBytes() {
try {
return (fullMessage!=null ? fullMessage.getBytes("UTF-8") : null);
} catch (UnsupportedEncodingException e) {
return (fullMessage!=null ? fullMessage.getBytes() : null);
}
}
public void setFullMessageBytes(byte[] fullMessageBytes) {
try {
fullMessage = (fullMessageBytes!=null ? new String(fullMessageBytes, "UTF-8") : null );
} catch (UnsupportedEncodingException e) {
fullMessage = (fullMessageBytes!=null ? new String(fullMessageBytes) : null ); }
}
</java>
With this modification I was able to save and read special characters (ñ,é,ò. etc..)
Maybe its a bug.