Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Archive: Special Characters not supported in file names within zip files #193

Open
ddarwent opened this issue Oct 19, 2020 · 0 comments
Open

Comments

@ddarwent
Copy link

Details of the scenario you tried and the problem that is occurring

When there are special characters in the file name e.g. [char]0x201A these get convert to , ([char]0x00E9) so the filename Tést filenamé.htm in the zip will be called T‚st filenam,.htm when extracted.

Verbose logs showing the problem

Suggested solution to the issue

Support of encoding in the DSC resource.

$enc = [System.Text.Encoding]::GetEncoding(29001) #29001, x-Europa, Europa
[System.IO.Compression.ZipFile]::ExtractToDirectory("$Path\Test.zip", "$root$sitePath", $enc)

The DSC configuration that is used to reproduce the issue (as detailed as possible)

Archive WebsiteZip {
    Destination = "$root\$sitePath\$hostid"
    Path        = "$ArtifactRoot\$PackageFile"
    DependsOn   = "[File]IISRoot"
    Checksum    = "SHA-1"
    Validate    = $true
    Ensure      = "Present"
    Force       = $true
}

The operating system the target node is running

OsName : Microsoft Windows Server 2019 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture : 64 bits
WindowsVersion : 1809
WindowsBuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage : en-US
OsMuiLanguages : {en-US, fr-FR}

Version and build of PowerShell the target node is running

Name Value


PSVersion 5.1.17763.1490
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.1490
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Version of the DSC module that was used ('dev' if using current dev branch)

1.1

@ddarwent ddarwent changed the title Archive: Special Characters not supported in file names with zip files Archive: Special Characters not supported in file names within zip files Oct 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant