Buffer should convert to UTF8 not ASCII
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
Research direction
Start at line 37 of ddb_eventprocessor.js and inspect how the Kinesis payload is decoded before JSON processing. Confirm the change by checking that payloads containing Chinese or other non-ASCII characters are preserved and no longer produce invalid JSON control-character errors.
Written by the indexing model from the issue text.
Description
I think line 37 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 😉 .
- Dominant language
- JavaScript
- Stars
- 344
- Forks
- 127
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-samples/lambda-refarch-streamprocessing
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
aws-samples/lambda-refarch-streamprocessing#12 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 1/5 Under an hour Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
All issues in aws-samples/lambda-refarch-streamprocessing
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
curation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
amponce/archive-movie-browser#186 ·
-
light
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
aemdemos/patients-stryker#253 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
clerk/javascript#9852 ·