Skip to content

Extract 7z archive with UTF-8 filename #103

@hexabyte23

Description

@hexabyte23

Hi all,

For win10, Is there a parameter to set to extract an 7z archive with UTF8 filenames ?

short ExtractorPrivate::writeData(struct archive_entry* entry) {
...
// UTF-8 in archive entry messes up when extracting under Windows
   // when UTF-8 is not set, to fix this we first get the archive
   // entry pathname in raw bytes then convert it to wide characters
   // and set it has the new pathname which should make libarchive
   // handle it better.
...
}

UTF-8 is not set where ?

When debugging

Capture d’écran 2024-12-14 à 10 53 58

Not sure that at line 902

auto wstr = ptname.toStdWString();

fix the problem, as wstr still showing bad characters

Capture d’écran 2024-12-14 à 11 05 58

As always in macOS, its working like a charm.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions