I have written ps script to download zip from server and unzip it at local, script is working fine as long as zipped files don't contain any special character.
But when some of files from server having character like "àòèéù" after unzipping some how it's showing ?or [] not original data.
If i extract same zip using winrar or other tool i can see orignal character set as it is and it's expected.
Please help me to understand or resolve this issue how i can persist orignal character while unzipping using power shell script.
$client = New-Object "System.Net.WebClient"
#$client.Headers.add("Authorization",$CookieContainer.GetCookieHeader($token))
$client.Headers.add("Authorization",$token)
#$client.UseDefaultCredentials = $true
#$client.Credentials = Get-Credential
try
{
"Downloading"
$client.DownloadFile([string]$url,[string]$documents_path)
"Finished Download"
"Unzipping Zip"
"$documents_path"
$zipPackage = (new-object -com shell.application).NameSpace($documents_path)
$destinationFolder = (new-object -com shell.application).NameSpace($target_path)
$destinationFolder.CopyHere($zipPackage.Items(),16)
"$target_path"
"Unzipping Zip Done"
}
Update:
It's only happening for xml files without encoding information, how i can encode this xml file while extracting or after extracting.