--- a/src/init.cpp +++ b/src/init.cpp @@ -98,6 +98,16 @@ #ifndef GUI int main(int argc, char* argv[]) { + #ifndef WIN32 + try + { + boost::filesystem::path::codecvt(); // Raises runtime error if current locale is invalid + } catch(std::runtime_error &e) + { + setenv("LC_ALL", "C", 1); // Force C locale + } + #endif + bool fRet = false; fRet = AppInit(argc, argv); --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -122,6 +122,16 @@ #ifndef BITCOIN_QT_TEST int main(int argc, char *argv[]) { + #ifndef WIN32 + try + { + boost::filesystem::path::codecvt(); // Raises runtime error if current locale is invalid + } catch(std::runtime_error &e) + { + setenv("LC_ALL", "C", 1); // Force C locale + } + #endif + // Command-line options take precedence: ParseParameters(argc, argv);