Use local 8-bit strings for paths passed to Fortran

By using  the local 8-bit character  set we can allow  local non-ASCII
characters in file paths, for example user account names on MS Windows
with characters in the default code page.
This commit is contained in:
Bill Somerville
2021-08-22 13:24:03 +01:00
parent 8cbf31ebdf
commit 8794bad146
8 changed files with 31 additions and 46 deletions
+2 -2
View File
@@ -443,7 +443,7 @@ void EqualizationToolsDialog::impl::plot_current ()
plot_.graph (3)->rescaleValueAxis ();
QFileInfo refspec_file_info {data_directory_.absoluteFilePath ("refspec.dat")};
std::ifstream refspec_file (refspec_file_info.absoluteFilePath ().toLatin1 ().constData (), std::ifstream::in);
std::ifstream refspec_file (refspec_file_info.absoluteFilePath ().toLocal8Bit ().constData (), std::ifstream::in);
unsigned n;
if (refspec_file >> amp_poly_low_ >> amp_poly_high_ >> n)
{
@@ -499,7 +499,7 @@ void EqualizationToolsDialog::impl::plot_phase ()
, "Phase Coefficient Files (*.pcoeff)");
if (!phase_file_name.size ()) return;
std::ifstream phase_file (phase_file_name.toLatin1 ().constData (), std::ifstream::in);
std::ifstream phase_file (phase_file_name.toLocal8Bit ().constData (), std::ifstream::in);
int n;
float chi;
float rmsdiff;