diff --git a/libs/openFrameworks/utils/ofUtils.cpp b/libs/openFrameworks/utils/ofUtils.cpp index c362239b6c3..0c4af11c9e6 100644 --- a/libs/openFrameworks/utils/ofUtils.cpp +++ b/libs/openFrameworks/utils/ofUtils.cpp @@ -781,6 +781,16 @@ static std::locale getLocale(const string & locale) { } catch (...) { ofLogWarning("ofUtils") << "Couldn't create locale " << locale << " using default, " << loc.name(); } + // default locale only maps ASCII case (e.g. LANG unset): use a UTF-8 one + if (locale.empty() && std::tolower(L'\u00C9', loc) == L'\u00C9') { + for (const char * name : { "C.UTF-8", "C.utf8", "en_US.UTF-8" }) { + try { + loc = std::locale(name); + break; + } catch (...) { + } + } + } #endif return loc; }