Amazon SQS Character Encoding Problem

I am trying to insert characters like ä, á, ó, í, â etc. in the body of an Amazon SQS message. But these characters are converted to some other characters in SQS (e.g.,). Is there any way to solve this problem.

thanks

+4
source share
4 answers

Thanks for answers. I think the best way to overcome this problem is to save the message body in AmazonSQS in HTML-ENTITIES format. Therefore, before saving the message, I encode it in HTML_ENTITIES format using the php method mb_convert_encoding (line $ str, line $ to_encoding [, mixed $ from_encoding]) .

If anyone has a better solution, feel free to add comments.

thanks

+2
source

This is probably due to the problem of character encoding in your code. Recommended article on this topic - Joel Absolute minimum. Every software developer should absolutely, positively need to know about Unicode and character sets (without excuses!) .

It looks like your characters are encoded by UTF-8 somewhere, and the corresponding UTF-8 decoding operation is not performed as you expect.

+1
source

try utf8_encode

0
source

I saw this was resolved on onlinemq but still exists in SQS

0
source

Source: https://habr.com/ru/post/1299282/


All Articles