Add charset check

This commit is contained in:
JeremyStar™ 2024-12-20 23:42:59 +01:00
parent cd81e60808
commit edc1c4c1eb
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -25,6 +25,8 @@ import de.staropensource.engine.base.logging.Logger
import de.staropensource.engine.base.utility.Environment
import de.staropensource.engine.base.utility.FileAccess
import de.staropensource.engine.base.utility.dnihbd.BuildInformation
import java.nio.charset.Charset
import java.nio.charset.StandardCharsets
/**
* Primary class of the engine.
@ -159,7 +161,9 @@ class Engine private constructor() {
logger.info("Bootstrapping")
// Run bootstrapping code
// *none yet*
// -> Run checks
if (Charset.defaultCharset() != StandardCharsets.UTF_8)
logger.crash("The StarOpenSource Engine does not support other charsets than UTF-8")
// Bootstrap subsystems
logger.verb("Bootstrapping subsystems")