I have a web app that sends messages to an Amazon SQS Queue. Amazon sqs lib throws a 'AmazonSQSException' since the message contained invalid binary character. The message is the referrer obtained from an incoming http request. This is what it looks like:
Looks like the characters in bold are the invalid characters. Is there an easy way to filter out characters characters that are not accepted by amazon ?
Here are the characters allowed by amazon in message body. I am not sure what regex i should use to replace invalid characters by ''