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
@@ -18,7 +18,7 @@ void getfile(QString fname, bool xpol, int dbDgrd)
memset(id,0,2*npts);
char name[80];
strcpy(name,fname.toLatin1());
strcpy(name,fname.toLocal8Bit());
FILE* fp=fopen(name,"rb");
if(fp != NULL) {
@@ -61,7 +61,7 @@ void savetf2(QString fname, bool xpol)
qint16* buf=(qint16*)malloc(2*npts);
char name[80];
strcpy(name,fname.toLatin1());
strcpy(name,fname.toLocal8Bit());
FILE* fp=fopen(name,"wb");
if(fp != NULL) {