diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/util/ucompose.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util/ucompose.hpp b/src/util/ucompose.hpp index d29cf5424..af5edbc85 100644 --- a/src/util/ucompose.hpp +++ b/src/util/ucompose.hpp @@ -182,7 +182,12 @@ namespace UStringPrivate : arg_no(1) { #if __GNUC__ >= 3 - os.imbue(std::locale("")); // use the user's locale for the stream + try { + os.imbue(std::locale("")); // use the user's locale for the stream + } + catch (std::runtime_error& e) { // fallback to classic if it failed + os.imbue(std::locale::classic()); + } #endif std::string::size_type b = 0, i = 0; |
