Mendix json library encodes the special characters into unicode

0
Hello,   I am using the Mendix third-party JSON library to encode a string into a JSON object. However, the string contains special characters that are being converted to Unicode. This is causing problems when converting the JSON object back into a string, where string contains the unicode instead of the characters. I want to know how to convert the string to json object with correctly encoding. Can you please advise on how to resolve this issue?   Thank you.
asked
2 answers
1

Hi Sanyogita,

 

Try use the below function to remove special characters,

replaceAll($stringInput, '[^a-zA-Z0-9!\"#$%&()*+,.:;?@\\^_` -{|}~\f\n\r\t]', '')

If still same issue then try refer the below similar communication,

https://community.mendix.com/link/space/microflows/questions/127300

 

Hope it Helps!

Thanks & Regards,

Manikandan K

answered
1

Then it is more a stack overflow question like this one: https://stackoverflow.com/questions/583562/json-character-encoding-is-utf-8-well-supported-by-browsers-or-should-i-use-nu

See also the JSON RFC on which characters need to be encoded: https://www.ietf.org/rfc/rfc4627.txt

Regards,

Ronald

answered