Apply JSON transformation assertion is not converting accent characters in Spanish currently
search cancel

Apply JSON transformation assertion is not converting accent characters in Spanish currently

book

Article ID: 282580

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

Apply JSON transformation (XML to JSON) OOTB assertion  transforms  ' Ñ '  to ' ? '.

For example:

<Spanisháccent>="NIa&#209;O" changed to <Spanisháccent>: "NI?O" after transformation

 

Environment

Container Gateway 10.x and 11.x

Cause

The default charset of the JVM is determined at the JVM startup and depends on the charset and locale of the underlying operating system.

The default charset can be overridden by setting the system property 'file.encoding' i.e "-Dfile.encoding=UTF8".

The default container gateway does not have this set for the JVM

Resolution

Container gateway you need to add to the variable EXTRA_JAVA_ARGS in the YAML file 

Example:

 EXTRA_JAVA_ARGS: "-XX:ParallelGCThreads=4 -Dcom.l7tech.bootstrap.autoTrustSslKey=trustAnchor,TrustedFor.SSL,TrustedFor.SAML_ISSUER  -Dcom.l7tech.server.siteminder.enabled=true -Dcom.l7tech.server.disableFileLogsinks=false -Dcom.l7tech.server.log.console.extraCats=AUDIT,LOG,TRAFFIC"

TO 

 EXTRA_JAVA_ARGS: "-XX:ParallelGCThreads=4 -Dcom.l7tech.bootstrap.autoTrustSslKey=trustAnchor,TrustedFor.SSL,TrustedFor.SAML_ISSUER  -Dcom.l7tech.server.siteminder.enabled=true -Dcom.l7tech.server.disableFileLogsinks=false -Dcom.l7tech.server.log.console.extraCats=AUDIT,LOG,TRAFFIC -Dfile.encoding=UTF-8"