api: fix handling of non-ascii UTF-8 encoded data
Merge remote-tracking branch 'origin/develop' into develop