Based on https://github.com/blender/blender/commit/8e237d83f2138fb94933f971a070a0552f1f506a diff --git intern/locale/boost_locale_wrapper.cpp intern/locale/boost_locale_wrapper.cpp index ede9377b38f..73433fe7c5e 100644 --- intern/locale/boost_locale_wrapper.cpp +++ intern/locale/boost_locale_wrapper.cpp @@ -117,13 +117,6 @@ void bl_locale_set(const char *locale) #undef LOCALE_INFO } - // Extra catch on `std::runtime_error` is needed for macOS/Clang as it seems that exceptions - // like `boost::locale::conv::conversion_error` (which inherit from `std::runtime_error`) are - // not caught by their ancestor `std::exception`. See - // https://developer.blender.org/T88877#1177108 . - catch (std::runtime_error const &e) { - std::cout << "bl_locale_set(" << locale << "): " << e.what() << " \n"; - } catch (std::exception const &e) { std::cout << "bl_locale_set(" << locale << "): " << e.what() << " \n"; } diff --git intern/locale/osx_user_locale.mm intern/locale/osx_user_locale.mm index ce694b5fc1e..e2f65d39df9 100644 --- intern/locale/osx_user_locale.mm +++ intern/locale/osx_user_locale.mm @@ -14,17 +14,7 @@ const char *osx_user_locale() CFLocaleRef myCFLocale = CFLocaleCopyCurrent(); NSLocale *myNSLocale = (NSLocale *)myCFLocale; [myNSLocale autorelease]; - - // This produces gettext-invalid locale in recent macOS versions (11.4), - // like `ko-Kore_KR` instead of `ko_KR`. See T88877. - // NSString *nsIdentifier = [myNSLocale localeIdentifier]; - - const NSString *nsIdentifier = [myNSLocale languageCode]; - const NSString *const nsIdentifier_country = [myNSLocale countryCode]; - if ([nsIdentifier length] != 0 && [nsIdentifier_country length] != 0) { - nsIdentifier = [NSString stringWithFormat:@"%@_%@", nsIdentifier, nsIdentifier_country]; - } - + NSString *nsIdentifier = [myNSLocale localeIdentifier]; user_locale = ::strdup([nsIdentifier UTF8String]); [pool drain];