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
Use unicode by default #515
Comments
Hi, thanks for raising this. I think rubyzip doesn't actually support encodings properly at all, when you compare it to the Zip specification 😟 What should really happen is that by default filenames and comments should be stored in IBM Code Page 437 unless the EFS bit is set, in which case it should be UTF-8. Those are the only two options allowed for in the Zip spec.
(As an aside, I think So this is on my list of things to properly fix. I think I need to properly implement |
Thank you @hainesr ! I didn't realize that As for |
I was a little unfair on rubyzip here. It does do the right thing, re bytesize, so I think that's why using I'm trying to work out why I'll leave this open as a bug to remind me to look at it properly, and I think the documentation certainly needs to be improved too. |
Just as a reminder, this wiki page should be updated or deleted after v3.0 is released: https://github.com/rubyzip/rubyzip/wiki/Files-with-non-ascii-filenames |
Thanks for that @6temes. I have to say I don't understand the advice in the final paragraph which says to not use |
Hi @hainesr ! I was hesitant to delete the old text, so I left it under my update, but I agree with you that I just made everything confusing. :) I just fixed it. |
In 2022, all mainstream OSes are currently supporting Unicode for file names.
For users not using English, the current default configuration produces broken filenames when saving files with characters that are not in the English alphabet.
This is easier fixable by using this configuration:
Zip.force_entry_names_encoding = 'UTF-8'But it would be probably a better experience if the library was configured to work with Unicode by default.
The text was updated successfully, but these errors were encountered: