After putting RUNTIME-ENCODING"OEM" in the shared assembly I get the expected error:
Additional information: 198 Load failure [Program has an incompatible codepage dependency
"ClassLibrary1.GET_ENVIRONMENT_VARIABLE" is using codepage OEM United States
but the main program "ASP.logon_aspx" is using Western European (Windows)
Please see documentation for more information.]
It switched from UTF-8 to OEM.