Ticket #495 (closed task: fixed)
Warn when locale is bogus
|Reported by:||Philip||Owned by:||sergiovier|
|Priority:||Nice to Have||Milestone:||Alpha 4|
|Component:||Core engine||Keywords:||simple, review|
What currently happens:
$ LANG=bogus ./pyrogenesis_dbg terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid Aborted
This can happen on misconfigured systems where the locales aren't set up correctly. It would be better to give a much more informative warning and fall back to a default - e.g. perl says:
$ LANG=bogus perl perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "", LC_ALL = (unset), LANG = "bogus" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C").
which is more helpful.
We need to do this fairly early (before any attempts to access the filesystem), so maybe in EarlyInit in GameSetup.cpp.