Getting junk character in the payload instead Arabic Chars
search cancel

Getting junk character in the payload instead Arabic Chars

book

Article ID: 207382

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

One of the application team is trying to check one scenario in which they are sending some arabic language in the payload and XMLGW is converting it to "??????".

Payload sent by application team:

"subject":"<arabic chars>"

Payload received at XMLGW:

"subject":"??? ????? ??????"

 

Content type sent in the request by application team is as below

contentType = {String} "application/json;charset=UTF-8"
[0] = {String} "accept:application/json;charset=UTF-8"
[1] = {String} "accept-encoding:gzip,deflate"

Environment

Release : 9.4

Component : API GATEWAY

Cause

Language set on Application level or browser used

Resolution

The problem comes from the browser when displayed the Arabic chars, gateway is passing them correctly using UTF-8, using Service debugger to confirm.

A simple test to confirm from customer site that problem is out of gateway.

1. Create a simple policy on gateway , example :

 

2. In Goolgle chrome Browser , added Arabic Language to display and select offer to translate pages in this language also (optional)

 

by using Google Chrome Browser I added Arabic Language to display and offer to display also.

 

3. Policy Debugger shows the payload and response with right Arabic chars as expected. Used this chars : subject":"<Arablic Chars>"