Hi all,
In order to unzip a zip file from my unity script
I did the following :
-
from DotNetZip (http://dotnetzip.codeplex.com) i got the Ionic.zip.dll and put it the assets folder.
-
write the following code:
var options:Ionic.Zip.ReadOptions = new Ionic.Zip.ReadOptions(); options.Encoding = System.Text.Encoding.GetEncoding("utf-8"); var zip:Ionic.Zip.ZipFile = new Ionic.Zip.ZipFile.Read(fileName,options); zip.ExtractAll(Application.persistentDataPath + "/",Ionic.Zip.ExtractExistingFileAction.OverwriteSilently);
-
Works when i run it from Unity.
-
When build it & run it as test.exe I got an “IBM437 codepage not supported”
ArgumentException: Encoding name ‘IBM437’ not supported
Parameter name: name
at System.Text.Encoding.GetEncoding (System.String name) [0x00000] in :0at Ionic.Zip.ZipFile…cctor () [0x00000] in :0
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Ionic.Zip.ZipFile
at connectUnzip+$Start$1+$.MoveNext () [0x00000] in :0
Any idea whats is happening?
Do we have an alternative on how to unzip files ?
Is it possible to have a cross platform solution ?