As a workaround you can try the below points and check if issue still replicates:
1. The default encoding is based on the JVM settings, not anything in Pega. UTF-8 is a common default, but not guaranteed since your JVM might set another encoding.
The easiest way to do this is to set the JVM level encoding using this Java option: -Dfile.encoding=UTF-8 . This makes Pega encode everything in UTF-8 and will be the most consistent overall. The XML tag won't change how Pega encodes things, but you should include it as the endpoint will use it to determine that Pega is encoding in UTF-8. If you don't include that tag, an endpoint will usually use its default encoding, which will cause issues if that isn't also UTF-8.