i4Ds / STIX-GSW

STIX Ground-Analysis Software Package
11 stars 16 forks source link

Change "" to '' for compatibility with linux #213

Open paolomassa opened 5 months ago

paolomassa commented 5 months ago

There are some places in the code in which strings are defined within "" (see, e.g., here and ). This is incompatible with linux distributions. It should be changed to ' ' in the entire software.

samaloney commented 1 month ago

@paolomassa has any progress been made on this? Are you sure the issue is the 's or the encoding of the source files?

paolomassa commented 1 month ago

We still need to implement the modifications, I'll do that soon. For what I know it should be just a problem of changing " with ' , nothing more.

samaloney commented 1 month ago

Ok I guess I just don't understand the problem "linux" doesn't have an issue with " or ' so it must be IDL on linux and even then I don't really understand. I have had encoding issues before ascii / utf-8 / utf-16 or latin1 etc

I created these tiny test scripts and they work on linux?

test_func.pro

function test_func

a = 'a'
b = "b"

print, a , b

end

test_pro.pro

pro test_pro

a='a'
b="b"

print, a, b

end

IDL> test_func()
ab
       0
IDL> test_pro
ab
``
paolomassa commented 1 month ago

For what I understood, the problem is that the IDL installation on linux has troubles sometimes when strings are defined within ". If I remember correctly, @PaipaPsyche reported this issue to me.

@PaipaPsyche could you please tell us more if it was you who found this issue? Thanks!

PaipaPsyche commented 1 month ago

I'm running SSW on an Ubuntu distribution. For some reason I always have an error when running the demo because of these "" strings (the subroutines cannot recognize the specified date/UID ). The error disappears when replacing the " for ' in the scripts.

samaloney commented 1 month ago

Do you happen to know the encoding of the file is?

PaipaPsyche commented 1 month ago

it's ASCII