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
+3 -3
View File
@@ -118,8 +118,8 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
&azmoondx, &elmoondx, &ntsky, &m_dop, &m_dop00, &ramoon, &decmoon,
&dgrd, &poloffset, &xnr, &techo, &width1, &width2,
bTx,
AzElFileName.toLatin1().data(),
jpleph.toLatin1().data());
AzElFileName.toLocal8Bit ().constData (),
jpleph.toLocal8Bit ().constData ());
if(!hisgrid.size ()) {
azmoondx=0.0;
@@ -229,7 +229,7 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
&dgrd, &poloffset, &xnr, &techo, &width1, &width2,
bTx,
nullptr, // don't overwrite azel.dat
jpleph.toLatin1().data());
jpleph.toLocal8Bit ().constData ());
FrequencyDelta offset {0};
switch (m_DopplerMethod)
{