Merge pull request #943 from yrabbit/locale
gowin: support for locales other than en_US and C
This commit is contained in:
commit
2df9d3537b
@ -45,7 +45,15 @@
|
|||||||
|
|
||||||
NEXTPNR_NAMESPACE_BEGIN
|
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()
|
bool CommandHandler::parseOptions()
|
||||||
{
|
{
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#ifdef MAIN_EXECUTABLE
|
#ifdef MAIN_EXECUTABLE
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <locale>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "design_utils.h"
|
#include "design_utils.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user