Merge pull request #943 from yrabbit/locale

gowin: support for locales other than en_US and C
This commit is contained in:
gatecat 2022-03-15 20:44:03 +00:00 committed by GitHub
commit 2df9d3537b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -45,7 +45,15 @@
NEXTPNR_NAMESPACE_BEGIN
CommandHandler::CommandHandler(int argc, char **argv) : argc(argc), argv(argv) { log_streams.clear(); }
CommandHandler::CommandHandler(int argc, char **argv) : argc(argc), argv(argv)
{
try {
std::locale::global(std::locale(""));
} catch (const std::runtime_error &e) {
// the locale is broken in this system, so leave it as it is
}
log_streams.clear();
}
bool CommandHandler::parseOptions()
{

View File

@ -21,6 +21,7 @@
#ifdef MAIN_EXECUTABLE
#include <fstream>
#include <locale>
#include <regex>
#include "command.h"
#include "design_utils.h"