Fix UTF-8 handling when running the game, env-vars, and setting the project path (#1632)

* fix utf-8 handling around env-vars

* fix file opening errors related to unicode

* add uncaught exception handler in `gk` to ensure something is logged

* gracefully fail if window icon cant be loaded and work with unicode

* linux fix and add changes to vendor file
This commit is contained in:
Tyler Wilding
2022-07-10 19:03:24 -04:00
committed by GitHub
parent 63ac19440c
commit 1b67d1dc77
21 changed files with 198 additions and 168 deletions
+4 -7
View File
@@ -19,14 +19,11 @@
// to make it easier to test a subset of tests
int main(int argc, char** argv) {
#ifdef _WIN32
auto args = get_widechar_cli_args();
std::vector<char*> string_ptrs;
for (auto& str : args) {
string_ptrs.push_back(str.data());
fs::u8arguments u8guard(argc, argv);
if (!u8guard.valid()) {
std::cerr << "Bad encoding, needs UTF-8." << std::endl;
exit(EXIT_FAILURE);
}
argv = string_ptrs.data();
#endif
// hopefully get a debug print on github actions
setup_cpu_info();