Add support for UTF8 filenames in wxZipOutputStream

Zip filenames containing non ASCII characters will be marked with
bit 11 in the general purpose flags and will use UTF-8 encoding.

By only setting the flag when non ASCII characters are used the
created archives should be binary identical to previous versions.

The old behavior can be achieved by explicitly using wxConvLocal
with the constructor. This should also ensure that
existing code using a custom wxMBConv should work as before.
This commit is contained in:
Tobias Taschner
2017-10-22 22:34:56 +02:00
parent 73a22766ee
commit fe77b2d593
4 changed files with 31 additions and 8 deletions

View File

@@ -74,6 +74,9 @@ INCOMPATIBLE CHANGES SINCE 3.1.0:
- The enum value wxTASKBAR_JUMP_LIST_DESTIONATION, which was added in 3.1.0,
contains a typo and has been renamed to wxTASKBAR_JUMP_LIST_DESTINATION.
- wxZipOutputStream will now automatically convert filenames to UTF-8, if the
wxMBConv used when calling the constructor supports UTF-8 encoding.
All:
@@ -98,6 +101,7 @@ All:
- Add wxCMD_LINE_HIDDEN wxCmdLineParser flag (Lauri Nurmi).
- Fix wxRmdir() with non-ASCII paths (trivia21).
- Don't crash in wxFFile::Eof() or Error() on closed file (jprotopopov).
- Add UTF-8 support to wxZipOutputStream (Tobias Taschner).
All (GUI):