Posted: 9 Oct 2018 10:04 EDT Last activity: 10 Oct 2018 15:00 EDT
Encoding in UTF-8
I have a requirement to encode my xml in UTF-8 and also add this tag in my xmls while making connect-jms call to other systems. Can you please tell me if this is possible? I checked SMA and in file.encoding already UTF-8 is mentioned, still while firing the xml this tag is not sent.
My question is -
1. is it that by default Pega encodes in utf-8?
2. is it true that if I encode in UTF-8 but do not add this tag still my xml will be fired as encoded in utf-8
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.
2. 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.