aws-samples / aws-samples/lambda-refarch-streamprocessing

Buffer should convert to UTF8 not ASCII

オープン
#2 コメント 0 件 リアクション 4 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
344
フォーク
127
PR マージ指標
30日以内にマージされた PR はありません

説明

I think [line 37](https://github.com/awslabs/lambda-refarch-streamprocessing/blob/master/ddb_eventprocessor.js#L37) should be rewritten as `payload = new Buffer(record.kinesis.data, 'base64').toString('utf8');`

I recently ran into a situation where I could not for the life of me figure out why I kept getting this mysterious `unexpected token error` in Lambda's Cloudwatch console. After a few hours of testing and debugging, I finally figured out that I was passing invalid JSON Control Characters. BUT, what was really happening was I was converting chinese characters to ASCII.
The standard should be UTF8 to support our global connectivity 😉 .

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。