开发者

Amazon SQS character encoding problem

I am trying to insert characters like ä, á, ó, í, â, etc in message body of Amazon SQS. But these characte开发者_运维问答rs get converted to some other characters in SQS (e.g. ä). Is there a way to solve this problem.

Thanks


This is likely due to a character encoding issue in your code. A highly recommended article about this topic is Joel's The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!).

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


Thanks for the responses. I think the best way to over-come this problem is to store the message body in AmazonSQS in HTML-ENTITIES format. So before storing the message I encode it in HTML_ENTITIES format using php method mb_convert_encoding(string $str, string $to_encoding [,mixed $from_encoding]).

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

Thanks


try utf8_encode


I saw that this was solved at onlinemq but still exist in SQS

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜