Open starforce333 opened 1 year ago
``Trying to extract files and get errors. Files in archive has Cyrillic names.
If i use extractFileToDisk like this:
extractFileToDisk
void unzip(File file) { extractFileToDisk( file.path, file.path.substring(0, file.path.lastIndexOf('\\') + 1) + p.basenameWithoutExtension(element.path)); }
I receive error "FormatException (FormatException: Unexpected extension byte (at offset 0))"
But when i use extractArchiveToDisk extracted files has broken names
extractArchiveToDisk
void unzip(File file) { final bytes = File(file.path).readAsBytesSync(); final archive = ZipDecoder().decodeBytes(bytes); extractArchiveToDisk( archive, file.path.substring(0, file.path.lastIndexOf('\\') + 1) + p.basenameWithoutExtension(file.path)); }
Extracted file has name ¨£ .xls, but original name of file is Книга.xls
¨£ .xls
Книга.xls
archive.zip
``Trying to extract files and get errors. Files in archive has Cyrillic names.
If i use
extractFileToDisk
like this:I receive error "FormatException (FormatException: Unexpected extension byte (at offset 0))"
But when i use
extractArchiveToDisk
extracted files has broken namesExtracted file has name
¨£ .xls
, but original name of file isКнига.xls
archive.zip