Skip to Content
Technical Articles

Solving Special Character Issue while sending data to Receiver System using HTTP Adapter


While sending data to target system using HTTP adapter, all the special characters in the data turns into  “?”.Languages like Hebrew, Turkish, Russian contains special characters and these data after sending to target system with HTTP receiver channel gets corrupted and does not reflect as expected. Reason behind this is the HTTP receiver adapter needs a byte array and uses the defined charset for the encoding (or ASCII if nothing is defined). Characters that do not exist in the used encoding are replaced by “?” signs.


Let’s follow some simple steps to overcome this issue:


We will define the required encoding in Content Modifier step. Add a new property in Exchange Property as below:

Action            Name                                  Type                          Value

Create           CamelCharsetName           Constant                    UTF-8



While providing payload in JSON structure, we provide in the below way:

Now, the issue is Hebrew most of the times contains a (“) Double Quote in between strings.

Example : **עובד כ”א זמני**–Here is one ” in between string. While sending payload in JSON structure this ” creates an issue. Because JSON payload always come in between a “<string>”.

Here, CPI accepts this as a double quote in between the JSON payload string that does not have an ending double quote. So, we need to escape this double quote. We will try to escape this using a Groovy Script.

Please find the Sample escape sequence in below code snippet:


The replaceAll() function escapes all the double quotes in strings and shapes the payload in a good structure.


By taking care of these simple steps we can avoid data corruption in target systems while using HTTP receiver channel.



I found this KBA very helpful.



Thanks 🙂




You must be Logged on to comment or reply to a post.
  • Hi Toushif Ahmed,

    Seems simple enough. I’m sending a JSON message containing the special character ë (Cliënt). I added the exchange property, and during the trace all looks OK right up to the point where the special character is sent to the receiving system. Then it changes into a ? (Cli?nt). I added the exchange profile to a content modifier shape right before the HTTP receiver, but it still messes up the character.

    Any ideas?


    • Hey Iddo,


      Please add the exchange profile in the same content modifier where your request payload is in JSON format in the content modifier’s body with Content-Type as “application/json” in the content modifier’s header.