-
Notifications
You must be signed in to change notification settings - Fork 234
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
JlCompress is missing utf-8 support #114
Comments
I'd suggest the 5th way: Make
This way more options can be added later while maintaining full API and ABI compatibility. A good naming scheme is needed to avoid name clashes between static and non-static functions. I can't think of anything good right away, save for silly ideas of capitalizing or underscoring them... Or wait. Why |
I was actually hopeing for an easy solution to my problem, but you are right. Sp I started moving some code around. And will replace JlCompress implementation with a class called QuaZipUtil. That way, JlCompress can still be used as is. Will send a pull request once I have finished it and added some tests. |
@davidwojnar: Have you done a PR? |
JlCompress functions have recently been extended with an Options class which could now contain this functionality without expanding the interface into oblivion. I'll consider patching this in when there's an opportunity. I also like the setter idea which could be added in parallel. |
It would be nice to be able to use the JlCompress utility function with utf-8 support.
It should be fairly simple to do that. Basically for each function one only has to do the following:
QuaZip zip(fileCompressed);
zip.setUtf8Enabled(true);
Backward compatibility makes it a little bit trickier.
So, there are at least four possible solutions for that:
static bool JlCompress::enableUtf8 = false;
static bool compressFile(QString fileCompressed, QString file, bool enableUtf8 = false);
static bool compressFileUtf8(QString fileCompressed, QString file);
I can update the code, and send a pull request, but would like to have some opinion on which way to go.
I am preferring 3 the most, but am open for better suggestions.
The text was updated successfully, but these errors were encountered: