in0finite / SanAndreasUnity

Open source reimplementation of GTA San Andreas game engine in Unity
https://discord.gg/p6jjud5
MIT License
2.15k stars 353 forks source link

Missing Windows-1252 encoding DLL (Mono, Linux x86_64) #32

Closed echozio closed 4 years ago

echozio commented 5 years ago

When building the game the necessary files for Windows-1252 encoding will be missing in the exported player.

Copying I18N.West.dll and I18N.dll (from the editor) to the exported game directory or into the *_Data/Managed directory fixes this, as suggested at https://answers.unity.com/questions/42955/codepage-1252-not-supported-works-in-editor-but-no.html

Perhaps Unity could be instructed to include these in Mono builds? I have not tested if this issue affects Mono builds on other platforms than x86_64 Linux.

echozio commented 5 years ago

Here is the error the game spits out if you don't manually copy the DLLs.

System.NotSupportedException: Encoding 1252 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 <d7ac571ca2d04b2f981d0d886fa067cf>:0 
  at SanAndreasUnity.Importing.GXT.GXT.Win1252ToString (System.Byte[] bytes) [0x00000] in <344420f216234bcc963a3cbf1e979971>:0 
  at SanAndreasUnity.Importing.GXT.GXT.LoadTKEY (System.IO.BinaryReader binaryReader, System.String tableName) [0x000f2] in <344420f216234bcc963a3cbf1e979971>:0 
  at SanAndreasUnity.Importing.GXT.GXT.InternalLoad () [0x00047] in <344420f216234bcc963a3cbf1e979971>:0 
  at SanAndreasUnity.Importing.GXT.GXT.Load () [0x00017] in <344420f216234bcc963a3cbf1e979971>:0 
  at SanAndreasUnity.Behaviours.Loader.StepLoadGXT () [0x00000] in <344420f216234bcc963a3cbf1e979971>:0 
  at SanAndreasUnity.Behaviours.Loader+<LoadCoroutine>d__36.MoveNext () [0x001bb] in <344420f216234bcc963a3cbf1e979971>:0 
in0finite commented 5 years ago

Thank you for reporting the bug. It's caused by the recent GXT importing code. I didn't get a chance to build it.

in0finite commented 5 years ago

I am not sure how to fix this right now. Probably including those DLLs in the project. Or skip GXT loading. Or implementing 1252 encoding manually (there is probably code for this somewhere).

echozio commented 5 years ago

Including the DLLs was a solution that seemed to be widely suggested, but frankly it doesn't exactly sound very robust.

It appears to even be what Unity themselves suggest in their manual.

in0finite commented 5 years ago

For now, I will skip GXT loading. GXT is not used in the game anyway.

in0finite commented 4 years ago

This is temporarly fixed with dbeaf86.