Cloudy & Associates

Skip to content

Add caution when non-ASCII characters are in the input stream

Peter van Hoof requested to merge unicode into master

Narendra Bhatkar reported a problem where he saw different behavior for a model that was part of a grid and a single model with the same parameters (message #5719 on groups.io). This turned out to be a problem in the input script. The ionization parameter of -4 was likely copy-pasted and used the unicode character for the math minus. Cloudy doesn't understand unicode and silently ignored the math minus, thus reading the ionization parameter as 4 rather than -4. This of course is very dangerous, so at the very least a caution should be printed in the output that non-ASCII characters were found in the input. This is the bare minimum of what we should do, but we should consider further action...

Merge request reports