JCR-2098: Invalid byte 2 of 3-byte UTF-8 sequence while building the doc

https://jira.exoplatform.org/browse/JCR-2098