Added charset check and hint in startup logs (related to #7020)

This commit is contained in:
Oleg Agafonov 2020-08-28 08:34:01 +04:00
parent b610d0a31a
commit a0c16dc4e1
10 changed files with 14 additions and 9 deletions

View file

@ -1270,6 +1270,11 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
LOGGER.info("Starting MAGE client version " + VERSION);
LOGGER.info("Logging level: " + LOGGER.getEffectiveLevel());
LOGGER.info("Default charset: " + Charset.defaultCharset());
if (!Charset.defaultCharset().toString().equals("UTF-8")) {
LOGGER.warn("WARNING, found wrong default charset. You must:");
LOGGER.warn("* Open launcher -> settings -> java -> client java options");
LOGGER.warn("* Insert additional command at the the end: -Dfile.encoding=UTF-8");
}
startTime = System.currentTimeMillis();
Thread.setDefaultUncaughtExceptionHandler((t, e) -> LOGGER.fatal(null, e));