Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special character like é ,ó , é are not getting properly parsed #24

Open
kashifaliquazi opened this issue Nov 5, 2019 · 2 comments

Comments

@kashifaliquazi
Copy link

Special character like é ,ó , é are not getting properly parsed

for example

éviépinóé is converting to éviépinóé.

We are not sure which part on parsing is causing the issue and how to fix this.

@juicycool92
Copy link

same here with Korean. any hint?

@kkiwan
Copy link

kkiwan commented Mar 18, 2022

@juicycool92

const bodyBuffer = Buffer.from(event['body-json'].toString(), 'base64');
const boundary = multipart.getBoundary(
    event.params.header['Content-Type'] || event.params.header['content-type']
);
const parts = multipart.Parse(bodyBuffer, boundary);
const { filename } = parts[0];
console.log('filename ===>', filename);    // á\x84\x82á\x85¡á\x84\x8Bá\x85´á\x84\x91á\x85¡á\x84\x8Bá\x85µá\x86¯.png
let filename_ = Buffer.from(filename, 'binary').toString();
console.log('filename_ ===>', filename_);    // 나의파일.jpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants