The issue is fixed now. See this post in aws forum for details.
I wrote a nodejs function simply respond with some Chinese characters. But it respond with wrong characters.
exports.handler = function(event, context) {
context.succeed('Hello 世界!');
};
The function result becomes:
"Hello ������������!"
I came across this problem when I wrote a function to parse some Chinese websites and retrieve their page titles. I manage to convert them into utf-8 (I used needle for the request), and console.log(title) correctly display those Chinese characters. But the result from context.succeed() shows up like the example above. What should I do to deal with these non-latin characters when responding the result?
Q: What languages does AWS Lambda support? AWS Lambda natively supports Java, Go, PowerShell, Node. js, C#, Python, and Ruby code, and provides a Runtime API which allows you to use any additional programming languages to author your functions.
Lambda is an on-demand compute service that runs custom code in response to events.
From AWS Support (August 10, 2015):
Thank you for reaching out AWS Support with your question about Lambda and UTF-8.
We are presently researching this issue as other customers have brought this to our attention. There is no eta on when this will be resolved or if this is something we can resolve.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With