I was developing a unity3d application that was interacting with an excel file using a u3d opensource package. It was working fine in the unity editor. My excel data was showing in the editor but after building for the windows platform it was not showing excel data in unity anymore. I checked the debug logs of my standalone player and found below error
Uploading Crash Report NotSupportedException: Encoding 437 data could not be found. Make sure you have correct international codeset assembly installed and enabled. at System.Text.Encoding.GetEncoding (System.Int32 codepage) [0x0023f] in :0 at ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToString (System.Byte[] data, System.Int32 count) [0x0000e] in <8e8fa28d216a43ec8dcb2258d1f7bf00>:0 at ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToStringExt (System.Int32 flags, System.Byte[] data) [0x00022] in <8e8fa28d216a43ec8dcb2258d1f7bf00>:0 at ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry () [0x0014a] in <8e8fa28d216a43ec8dcb2258d1f7bf00>:0 at (wrapper remoting-invoke-with-check) ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry() at NPOI.OpenXml4Net.Util.ZipInputStreamZipEntrySource..ctor (ICSharpCode.SharpZipLib.Zip.ZipInputStream inp) [0x00015] in <09654f5254b44255887f6f774978077f>:0 at NPOI.OpenXml4Net.OPC.ZipPackage..ctor (System.IO.Stream filestream, NPOI.OpenXml4Net.OPC.PackageAccess access) [0x00015] in <09654f5254b44255887f6f774978077f>:0 at NPOI.OpenXml4Net.OPC.OPCPackage.Open (System.IO.Stream in1) [0x00000] in <09654f5254b44255887f6f774978077f>:0 at NPOI.Util.PackageHelper.Open (System.IO.Stream is1) [0x00000] in <6fd7ca6bad364c5ea94149697e721400>:0 at NPOI.XSSF.UserModel.XSSFWorkbook..ctor (System.IO.Stream is1) [0x00026] in <6fd7ca6bad364c5ea94149697e721400>:0 at DataConverters.ExcelToCsvWithNpoi.Convert (System.IO.MemoryStream stream) [0x00015] in <092dda33cb1b4692b34f7feb073574ee>:0 at LoadExcelAndConvertToCsv.OnLoaded (System.IO.MemoryStream stream) [0x0000c] in <092dda33cb1b4692b34f7feb073574ee>:0 at DataLoaders.MemoryStreamLoader+d__0.MoveNext () [0x000e5] in <092dda33cb1b4692b34f7feb073574ee>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in :0 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) [0x00000] in :0 at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () [0x00002] in <469e86e97fa2467ebffe49bbd6086325>:0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) UnityEngine.WorkRequest:Invoke() UnityEngine.UnitySynchronizationContext:Exec() UnityEngine.UnitySynchronizationContext:ExecuteTasks()469e86e97fa2467ebffe49bbd6086325>092dda33cb1b4692b34f7feb073574ee>092dda33cb1b4692b34f7feb073574ee>092dda33cb1b4692b34f7feb073574ee>6fd7ca6bad364c5ea94149697e721400>6fd7ca6bad364c5ea94149697e721400>09654f5254b44255887f6f774978077f>09654f5254b44255887f6f774978077f>09654f5254b44255887f6f774978077f>8e8fa28d216a43ec8dcb2258d1f7bf00>8e8fa28d216a43ec8dcb2258d1f7bf00>8e8fa28d216a43ec8dcb2258d1f7bf00>
Encoding 437 data could not be found.
After making some research I found that Mono does not include internalization by default that is required in the standalone application. So, in order to solve the error “Encoding 437 data could not be found. Make sure you have correct international codeset assembly installed and enabled” I have to copy two dlls into my projects plugins folder. The typical location of the dll files is
C:\Program Files\Unity\Hub\Editor\2019.4.27f1\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unityaot
I was using unity 2019.4.27. So at the unity installation location (given above), copy I18N.dll and I18N.West.dll into the plugins folder. Or you can directly copy it to standalone build under data -> Managed folder.
0 Comments