| 77 | } |
| 78 | |
| 79 | static std::locale * try_get_locale(const char * name) { |
| 80 | try { |
| 81 | return new std::locale(name); |
| 82 | } catch (std::exception &e) { |
| 83 | std::cerr << e.what() << std::endl; |
| 84 | } |
| 85 | return nullptr; |
| 86 | } |
| 87 | |
| 88 | static const std::locale * english_loc = try_get_locale("en_US.UTF-8"); |
| 89 | static const std::locale * system_loc = try_get_locale(""); |