REST API extended special characters

charlesdean
Kilo Contributor

Hi, the “????” (eye chars) in the following REST POST JSON payload is resulting in HTTP 500 failure. Is there anyway available to pass these characters?
{
  "sysparm_quantity": 1,
  "variables": {
    "AS_Support_var112": "Engineering Request",
    "Messaging_Detailed_Desc": "High Priority: Message Pullback Request\nPlease prioritize this request in order to mitigate the threat contained within these emails.\r\nWe need your assistance with removing the following email(s) from users' mailboxes and also submitting a sample to Cisco to classify the email(s) as Phishing/Malware to prevent their future delivery. These emails were delivered as part of a recent phishing campaign that GCR observed.\r\n\r\nPhishing Email(s) Details\r\n\r\nSender: marketing@mention.com\r\n\r\nRecipient: XXX.XXX@XXX.com, XXX.XXX@XXX.com\r\n\r\nSubject: XXX.XXXAdmin #o38A3s#, \", which Christmas song are you? ????\"\r\n\r\nAttachment Name: \r\n\r\nDelivery Timeframe: \r\n\r\nEmail Type: Phishing/Malware\r\n\r\nPlease contact GCR if you require any additional information.",
    "common_ReqBy": "7e0675dadb215090e6a99ac4db96193f",
    "common_ReqFor": "7e0675dadb215090e6a99ac4db96193f"
  }
}
Thank you, Charlie

8 REPLIES 8

ChrisBurks
Giga Sage

Possibly try setting the charset in the headers
For example
Content-type: application/json; charset=utf-8

charlesdean
Kilo Contributor

Hi Chris, yes I found that suggestion in another post, and tried it but failure was the same.

   this.logger.info("_postServiceCatalogItem.Content-type: " + rm.getRequestHeader('Content-type'));

Log: _postServiceCatalogItem.Content-type: application/json; charset=utf-8

Thanks

Hitoshi Ozawa
Giga Sage
Giga Sage

Try replacing the url encoded character "%F0%9F%91%81" (without the quotes) instead of the eye character.

vkachineni
Kilo Sage
Kilo Sage

👀 displayed as 

find_real_file.png

Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Vinod Kumar Kachineni
Community Rising Star 2022