Unable to pass special characters unicode value to REST activity
Hi , I am calling a POST REST API where in the body I need to pass [special character+”SomeString”]. The special character’s unicode value is ‘\u0091’ (this editor does not supports the special character. it is a question mark wrapped inside a square) In my microflow I am creating a string variable appending spl. char and the string. However the unicode value is not converted into special character but instead mendix treats it as a complete string. While debugging I realized that mendix is implicitly adding one extra ‘\’ to the unicode ‘\u0091’ to avoid escaping the ‘\’ part in the unicode and this is making it act as a complete string. How do I escape the entire string(\u0091) so that it will be converted to the special character . Note: I tried passing the actual spl. character in the body but it does not work. this is the special character. Thanks in Advance, Aditya
Whenever you want to send something over a REST call, you need to encode you string. In this case the � can be encoded to ‘%EF%BF%BD’
So in you case you would have ‘%EF%BF%BD’+’PackagingSN’.
If you want to dynamically encode your string in a microflow you can do so by changing the string with urlEncode($StringToEncode). See mendix documentation for more information.