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

Buffer should convert to UTF8 not ASCII

Đang mở
#2 0 bình luận 4 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
344
Fork
127
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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 😉 .

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.