Use the encoding for the current OEM code page when reading zips #68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When extracting zipped FM archives currently, some characters in filenames, notably non-ASCII German characters, are not recognized properly, resulting in their extracted filenames being incorrect and potentially causing problems with resource loading. For example, see the recently released Sinister Night, which has the non-ASCII 'ü' (a lowercase 'u' with an umlaut) in the filename of one of its included object models, "Rüstung.bin".
This pull request changes procedures involving zip extraction to use the encoding for the current OEM code page when reading zip entries instead of the current ANSI page, which is the default for a ZipArchive if no other encoding is specified. This change matches the behavior of 7-Zip and, consequently, other modern FM loaders. However, this should only be done when reading zip archives, not writing them. With ZipArchives, when reading archives the specified encoding is only used for entries where the language encoding flag in the general purpose bit flag of the file header is not set, while it is always used when writing archives.