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

Support non latin1 characters in file names #328

Closed
mks1948 opened this issue Jul 26, 2022 · 6 comments
Closed

Support non latin1 characters in file names #328

mks1948 opened this issue Jul 26, 2022 · 6 comments
Labels

Comments

@mks1948
Copy link

mks1948 commented Jul 26, 2022

After update from 14.0 to 15 i saw that is problem with non latin characters.
Package does not work correctly and after finish upload return some weird characters.
Please test with file name as : 你好.jpeg , معطل.jpeg or similar.

@jaydenseric
Copy link
Owner

If there is a problem with this, the v15.0.0 change most likely to be related would be the busboy dependency being updated to v1.

Package does not work correctly and after finish upload return some weird characters.

Can you please explain what happens more specifically? Where are the "weird characters".

@mks1948
Copy link
Author

mks1948 commented Jul 26, 2022

After upload file for example "你好.jpeg" i got a name as "ä½ å¥½.jpeg"

@jaydenseric
Copy link
Owner

What if you do:

console.log(Buffer.from(strangeName, "latin1").toString("utf-8"));

Does it log the right way?

@mks1948
Copy link
Author

mks1948 commented Jul 26, 2022

Yup this log working correctly but i think that is not way to fix it in my code :)

@jaydenseric
Copy link
Owner

Yes, you shouldn't need to do that when this bug is fixed.

@jaydenseric jaydenseric changed the title Latest version not supported non latin characters Support non latin1 characters in file names Jul 26, 2022
@jaydenseric
Copy link
Owner

This should be fixed in v16.0.1 🚀

Be sure to remove any Buffer.from(strangeName, "latin1").toString("utf-8") workarounds before updating.

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

No branches or pull requests

2 participants